Changeset 530:5c7433c2515c in documentViewer


Ignore:
Timestamp:
Apr 26, 2012, 5:37:15 PM (12 years ago)
Author:
casties
Branch:
default
Message:

fix problems with texttool/text

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • MpdlXmlTextServer.py

    r529 r530  
    215215            return pageinfo['textPage']
    216216       
    217         docpath = docinfo['textURLPath']
     217        docpath = docinfo.get('textURLPath', None)
     218        if not docpath:
     219            return None
     220       
    218221        # just checking
    219222        if pageinfo['current'] != pn:
  • documentViewer.py

    r528 r530  
    278278        # auto viewMode: text if there is a text else images
    279279        if viewMode=="auto":
    280             if docinfo.get('textURL', None) or docinfo.get('textURLPath', None):
     280            if docinfo.get('textURLPath', None):
     281                # docinfo.get('textURL', None) not implemented yet
    281282                viewMode = "text"
    282283                if viewLayer is None:
  • zpt/viewer_text.zpt

    r526 r530  
    3535<body tal:condition="numPages">
    3636  <tal:block
    37     tal:define="docpath docinfo/textURLPath;
     37    tal:define="docpath docinfo/textURLPath | nothing;
    3838                pn pageinfo/pn;
    3939                flowLtr python:docinfo.get('pageFlow','ltr')!='rtl';
Note: See TracChangeset for help on using the changeset viewer.