Changeset 258 for pkpgcounter/trunk/pkpgpdls/pclxl.py
- Timestamp:
- 09/07/05 20:30:56 (19 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pkpgcounter/trunk/pkpgpdls/pclxl.py
r253 r258 148 148 # From what I read in PCLXL documentation, the number 149 149 # of copies is an unsigned 16 bits integer 150 self.pages[self.pagecount]["copies"] = unpack(self.endianness + "H", minfile[pos-5:pos3])[0] 150 try : 151 self.pages[self.pagecount]["copies"] = unpack(self.endianness + "H", minfile[pos-5:pos3])[0] 152 except KeyError : 153 self.logdebug("It looks like this PCLXL file is corrupted.") 151 154 return 0 152 155 … … 461 464 462 465 infileno = self.infile.fileno() 463 self.pages = {} 466 self.pages = { 0 : { "copies" : 1, 467 "orientation" : "Default", 468 "mediatype" : "Plain", 469 "mediasize" : "Default", 470 "mediasource" : "Default", 471 } 472 } 464 473 self.minfile = minfile = mmap.mmap(infileno, os.fstat(infileno)[6], prot=mmap.PROT_READ, flags=mmap.MAP_SHARED) 465 474 tags = self.tags