Changeset 1451 for pykota/trunk/bin/pkpgcounter
- Timestamp:
- 05/06/04 14:37:47 (20 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/pkpgcounter
r1449 r1451 24 24 # 25 25 # $Log$ 26 # Revision 1.5 2004/05/06 12:37:29 jalet 27 # pkpgcounter : comments 28 # pkprinters : when --add is used, existing printers are now skipped. 29 # 26 30 # Revision 1.4 2004/05/04 12:21:55 jalet 27 31 # Now uses mmap in PCL mode … … 88 92 # Backported from C to Python by Jerome Alet, then enhanced 89 93 # with more PCL tags detected. I think all the necessary PCL tags 90 # are recognized to correctly handle PCL5e files wrt their number 91 # of pages 92 # 94 # are recognized to correctly handle PCL5 files wrt their number 95 # of pages. The documentation used for this was : 96 # 97 # HP PCL/PJL Reference Set 98 # PCL5 Printer Language Technical Quick Reference Guide 99 # http://h20000.www2.hp.com/bc/docs/support/SupportManual/bpl13205/bpl13205.pdf 100 # 93 101 infileno = infile.fileno() 94 102 infile = mmap.mmap(infileno, os.fstat(infileno).st_size, access=mmap.ACCESS_READ) 95 tagsends = { "&n" : "W", "&b": "W", "*i" : "W", "*l" : "W", "*m" : "W", "*v": "W", "*c" : "W", "(f" : "W", "*b" : "VW", "(s" : "W", ")s" : "W", "&p" : "X", "&l" : "X" } 103 tagsends = { "&n" : "W", 104 "&b" : "W", 105 "*i" : "W", 106 "*l" : "W", 107 "*m" : "W", 108 "*v" : "W", 109 "*c" : "W", 110 "(f" : "W", 111 "*b" : "VW", 112 "(s" : "W", 113 ")s" : "W", 114 "&p" : "X", 115 "&l" : "X" } 96 116 copies = 1 97 117 pagecount = 0