Changeset 526

Show
Ignore:
Timestamp:
11/28/07 16:53:05 (17 years ago)
Author:
jerome
Message:

Fixed a major problem in the detection of ISO/IEC DIS 26300 documents.
Added support for ink accounting for ISO/IEC DIS 26300 documents through the use
of abiword instead of OpenOffice?.org because the last one doesn't seem to want to print to
file from the command line.

Files:
1 modified

Legend:

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

    r522 r526  
    3030class Parser(pdlparser.PDLParser) : 
    3131    """A parser for OpenOffice.org documents.""" 
     32    totiffcommands = [ 'xvfb-run -a abiword --import-extension=.odt --print="| gs -sDEVICE=tiff24nc -dPARANOIDSAFER -dNOPAUSE -dBATCH -dQUIET -r\"%(dpi)i\" -sOutputFile=\"%(outfname)s\" -" "%(infname)s"' ] 
    3233    def isValid(self) :         
    3334        """Returns True if data is OpenDocument, else False.""" 
    3435        if self.firstblock[:2] == "PK" : 
    3536            try : 
    36                 self.archive = zipfile.ZipFile(self.infile) 
     37                self.archive = zipfile.ZipFile(self.filename) 
    3738                self.contentxml = self.archive.read("content.xml") 
    3839                self.metaxml = self.archive.read("meta.xml")