Commit cee0b536 authored by Nicolas Delaby's avatar Nicolas Delaby

Use subprocesstransform for better transformation handling.

changes in argument:
 '-enc' use UTF-8 by defaults
 '-layout' Maintain (as best as possible) the original physical layout of the text.
 '-nopgbrk' Don't insert page breaks



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@40925 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7e07c0a6
# -*- coding: utf-8 -*-
"""
Uses the xpdf (www.foolabs.com/xpdf)
"""
......@@ -6,10 +7,11 @@ from Products.PortalTransforms.interfaces import itransform
from Products.PortalTransforms.libtransforms.utils import bin_search, sansext
from Products.PortalTransforms.libtransforms.commandtransform import commandtransform
from Products.PortalTransforms.libtransforms.commandtransform import popentransform
from Products.PortalTransforms.libtransforms.commandtransform import subprocesstransform
import os
from zope.interface import implements
class pdf_to_text(popentransform):
class pdf_to_text(subprocesstransform):
implements(itransform)
__name__ = "pdf_to_text"
......@@ -20,8 +22,8 @@ class pdf_to_text(popentransform):
__version__ = '2004-07-02.01'
binaryName = "pdftotext"
binaryArgs = "%(infile)s -enc UTF-8 -"
useStdin = False
binaryArgs = "-layout -nopgbrk %(infile)s -"
useStdin = True
class old_pdf_to_text(commandtransform):
implements(itransform)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment