Commit 2790e780 authored by Jérome Perrin's avatar Jérome Perrin Committed by Arnaud Fontaine

dms: PDF bytes / str

parent c972a5a4
...@@ -32,7 +32,7 @@ import zope.interface ...@@ -32,7 +32,7 @@ import zope.interface
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type.Utils import bytes2str, str2bytes from Products.ERP5Type.Utils import bytes2str
from erp5.component.interface.IWatermarkable import IWatermarkable from erp5.component.interface.IWatermarkable import IWatermarkable
from erp5.component.document.Image import Image from erp5.component.document.Image import Image
from erp5.component.document.Document import ConversionError from erp5.component.document.Document import ConversionError
...@@ -240,7 +240,7 @@ class PDFDocument(Image): ...@@ -240,7 +240,7 @@ class PDFDocument(Image):
frame=page_number, display='identical') frame=page_number, display='identical')
if not src_mimetype.endswith('png'): if not src_mimetype.endswith('png'):
continue continue
content = str(png_data) content = bytes(png_data)
if content is not None: if content is not None:
filename = self.getStandardFilename(format='png') filename = self.getStandardFilename(format='png')
result = portal_transforms.convertToData(mime_type, content, result = portal_transforms.convertToData(mime_type, content,
......
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