Changeset 1681
- Timestamp:
- 08/27/04 10:58:50 (20 years ago)
- Location:
- pykota/trunk
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/NEWS
r1680 r1681 24 24 - 1.20alpha3 : 25 25 26 - Relax checks for PCL5 header to accomodate some strange 27 printer drivers. 28 26 29 - Now hardware accounting method works like software 27 30 accounting method wrt the subprocess' output. 31 32 - Hardware and Software accounting stop the print queue 33 when the accounting subprocess didn't work. This will 34 be configurable in the near future. 28 35 29 36 - 1.20alpha2 : -
pykota/trunk/pykota/pdlanalyzer.py
r1677 r1681 22 22 # 23 23 # $Log$ 24 # Revision 1.32 2004/08/27 08:58:50 jalet 25 # Relax checks for PCL5 header to accomodate strange printer drivers 26 # 24 27 # Revision 1.31 2004/08/22 08:25:33 jalet 25 28 # Improved ESC/P2 miniparser thanks to Paulo Silva … … 637 640 return 638 641 642 debugfile = open("/tmp/jerome_debugs_pykota.prn", "w") 643 639 644 # Use a temporary file, always seekable contrary to standard input. 640 645 self.infile = tempfile.TemporaryFile(mode="w+b") … … 644 649 break 645 650 self.infile.write(data) 651 debugfile.write(data) 646 652 self.infile.flush() 647 653 self.infile.seek(0) 654 655 debugfile.flush() 656 debugfile.close() 648 657 649 658 def closeFile(self) : … … 688 697 """Returns 1 if data is PCL, else 0.""" 689 698 if data.startswith("\033E\033") or \ 690 ((data[:128].find("\033%-12345X") != -1) and \ 691 ((data.find("LANGUAGE=PCL") != -1) or \ 692 (data.find("LANGUAGE = PCL") != -1) or \ 693 (data.find("LANGUAGE = Pcl") != -1))) : 699 (data[:128].find("\033%-12345X") != -1) : 694 700 return 1 695 701 else : … … 728 734 elif self.isPCLXL(firstblock) : 729 735 return PCLXLAnalyzer 736 elif self.isPDF(firstblock) : 737 return PDFAnalyzer 730 738 elif self.isPCL(firstblock) : 731 739 return PCLAnalyzer 732 elif self.isPDF(firstblock) :733 return PDFAnalyzer734 740 elif self.isESCP2(firstblock) : 735 741 return ESCP2Analyzer