Commit 4d9447fe authored by Sebastien Robin's avatar Sebastien Robin

if no format is specified, there is no need to convert the pdf,

we can directly returns it's type and data

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35914 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7b8811c8
......@@ -87,6 +87,8 @@ class PDFDocument(Image):
data = self._convertToText()
self.setConversion(data, mime=mime, format='txt')
return (mime, data)
elif format is None:
return self.getContentType(), self.getData()
else:
return Image._convert(self, format, **kw)
......
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