Show
Ignore:
Timestamp:
11/28/07 11:13:33 (16 years ago)
Author:
jerome
Message:

Finally we need to duplicate some datas, since for some file formats (e.g. mstrash)
a preliminary conversion will have to be done (through wvware for example) and we
would need to overwrite original values, which is not desirable.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pkpgcounter/trunk/pkpgpdls/pdf.py

    r520 r522  
    4747    def isValid(self) :     
    4848        """Returns True if data is PDF, else False.""" 
    49         if self.parent.firstblock.startswith("%PDF-") or \ 
    50            self.parent.firstblock.startswith("\033%-12345X%PDF-") or \ 
    51            ((self.parent.firstblock[:128].find("\033%-12345X") != -1) and (self.parent.firstblock.upper().find("LANGUAGE=PDF") != -1)) or \ 
    52            (self.parent.firstblock.find("%PDF-") != -1) : 
     49        if self.firstblock.startswith("%PDF-") or \ 
     50           self.firstblock.startswith("\033%-12345X%PDF-") or \ 
     51           ((self.firstblock[:128].find("\033%-12345X") != -1) and (self.firstblock.upper().find("LANGUAGE=PDF") != -1)) or \ 
     52           (self.firstblock.find("%PDF-") != -1) : 
    5353            self.logdebug("DEBUG: Input file is in the PDF format.") 
    5454            return True