comparison documentViewer.py @ 326:446cb6197547

*** empty log message ***
author abukhman
date Fri, 15 Oct 2010 16:23:03 +0200
parents 80ae2324562b
children 1c4e63d22283
comparison
equal deleted inserted replaced
325:c7e38112c23a 326:446cb6197547
753 753
754 def getPageinfo(self, current, start=None, rows=None, cols=None, docinfo=None, viewMode=None, tocMode=None,characterNormalization=""): 754 def getPageinfo(self, current, start=None, rows=None, cols=None, docinfo=None, viewMode=None, tocMode=None,characterNormalization=""):
755 """returns pageinfo with the given parameters""" 755 """returns pageinfo with the given parameters"""
756 pageinfo = {} 756 pageinfo = {}
757 current = getInt(current) 757 current = getInt(current)
758 pageinfo ['originalPage'] = originalPage
758 pageinfo['current'] = current 759 pageinfo['current'] = current
759 rows = int(rows or self.thumbrows) 760 rows = int(rows or self.thumbrows)
760 pageinfo['rows'] = rows 761 pageinfo['rows'] = rows
761 cols = int(cols or self.thumbcols) 762 cols = int(cols or self.thumbcols)
762 pageinfo['cols'] = cols 763 pageinfo['cols'] = cols
785 pageinfo['queryPageSize'] =self.REQUEST.get('queryPageSize', '10') 786 pageinfo['queryPageSize'] =self.REQUEST.get('queryPageSize', '10')
786 pageinfo['tocPN'] = self.REQUEST.get('tocPN', '1') 787 pageinfo['tocPN'] = self.REQUEST.get('tocPN', '1')
787 toc = int (pageinfo['tocPN']) 788 toc = int (pageinfo['tocPN'])
788 pageinfo['textPages'] =int (toc) 789 pageinfo['textPages'] =int (toc)
789 790
791
792
790 if 'tocSize_%s'%tocMode in docinfo: 793 if 'tocSize_%s'%tocMode in docinfo:
791 tocSize = int(docinfo['tocSize_%s'%tocMode]) 794 tocSize = int(docinfo['tocSize_%s'%tocMode])
792 tocPageSize = int(pageinfo['tocPageSize']) 795 tocPageSize = int(pageinfo['tocPageSize'])
793 # cached toc 796 # cached toc
794 if tocSize%tocPageSize>0: 797 if tocSize%tocPageSize>0: