Commit afa6cd9a authored by Priscila Manhaes's avatar Priscila Manhaes

added logger to convertion

parent ab27585d
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
from zope.interface import implements from zope.interface import implements
from cloudooo.interfaces.handler import IHandler from cloudooo.interfaces.handler import IHandler
from cloudooo.file import File from cloudooo.file import File
from cloudooo.util import logger
from subprocess import Popen, PIPE from subprocess import Popen, PIPE
from tempfile import mktemp from tempfile import mktemp
...@@ -46,6 +47,7 @@ class Handler(object): ...@@ -46,6 +47,7 @@ class Handler(object):
def convert(self, destination_format=None, **kw): def convert(self, destination_format=None, **kw):
""" Convert a pdf document """ """ Convert a pdf document """
logger.debug("PDFConvert: %s > %s" % (self.source_format, destination_format))
output_url = mktemp(suffix=".%s" % destination_format, output_url = mktemp(suffix=".%s" % destination_format,
dir=self.document.directory_name) dir=self.document.directory_name)
command = ["pdftotext", self.document.getUrl(), output_url] command = ["pdftotext", self.document.getUrl(), output_url]
......
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