Changeset 205:1fc7d73ce7ce in documentViewer
- Timestamp:
- Oct 5, 2010, 2:58:34 PM (15 years ago)
- Branch:
- default
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
MpdlXmlTextServer.py
r204 r205 131 131 def getNumTextPages (self, docinfo): 132 132 """get list of pages from fulltext (texts without images) and put in docinfo""" 133 #if 'numPages' in docinfo:133 if 'numPages' in docinfo: 134 134 # allredy there 135 # return docinfo 136 # xpath ='/count(//pb)' 137 # text=self.getServerData("xpath.xql", "document=%s&xpath=%s"%(docinfo['textURLPath'], xpath)) 138 # logging.debug("documentViewer (text) text: %s"%(text)) 139 #docinfo['numPages']=text('resultPage') 140 # dom = Parse(text) 141 142 # result= dom.xpath("//result/resultPage") 143 # docinfo['numPages']=int(getTextFromNode(result[0])) 144 #logging.debug("documentViewer (characterNormalization) docinfo['numPages']: %s"%(docinfo['numPages'])) 135 return docinfo 136 xpath ='/count(//pb)' 137 text=self.getServerData("xpath.xql", "document=%s&xpath=%s"%(docinfo['textURLPath'], xpath)) 138 docinfo['numPages']=text('resultPage') 139 dom = Parse(text) 140 result= dom.xpath("//result/resultPage") 141 docinfo['numPages']=int(getTextFromNode(result[0])) 145 142 return docinfo 146 143 -
documentViewer.py
r204 r205 616 616 if not docinfo['imagePath']: 617 617 # text-only, no page images 618 docinfo = self.getNum Pages(docinfo)618 docinfo = self.getNumTextPages(docinfo) 619 619 620 620 presentationUrls = dom.xpath("//texttool/presentation")
Note: See TracChangeset
for help on using the changeset viewer.