Changeset 1683

Show
Ignore:
Timestamp:
08/27/04 11:08:22 (20 years ago)
Author:
jalet
Message:

Improvement in PostScript? parser to avoid being fooled by clever "students"

Location:
pykota/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/NEWS

    r1681 r1683  
    2424    - 1.20alpha3 : 
    2525        
     26        - Small improvement in PostScript parser to avoid being 
     27          fooled by a change in number of copies :  
     28          The user can't ask for 200 copies of page 1 and 1 copy  
     29          of page 2 to fool PyKota anymore :  
     30          this would have been accounted for as 1 copy only, but 
     31          now the maximum value seen is used. 
     32           
    2633        - Relax checks for PCL5 header to accomodate some strange 
    2734          printer drivers. 
  • pykota/trunk/pykota/pdlanalyzer.py

    r1682 r1683  
    2222# 
    2323# $Log$ 
     24# Revision 1.34  2004/08/27 09:08:22  jalet 
     25# Improvement in PostScript parser to avoid being fooled by clever "students" 
     26# 
    2427# Revision 1.33  2004/08/27 09:02:34  jalet 
    2528# Forgot to remove some special debugging code... 
     
    197200                    pass 
    198201                else :     
    199                     if number > 1 : 
     202                    if number > self.copies : 
    200203                        self.copies = number 
    201204            elif line.startswith("1 dict dup /NumCopies ") : 
     
    206209                    pass 
    207210                else :     
    208                     if number > 1 : 
     211                    if number > self.copies : 
    209212                        self.copies = number 
    210213        return pagecount * self.copies