From c83a0a66d1f043235bb21efabed253c2aa75e793 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Wed, 10 Apr 2024 23:44:21 +0900 Subject: [PATCH] dms: PDF bytes / str --- .../portal_components/document.erp5.PDFDocument.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bt5/erp5_dms/DocumentTemplateItem/portal_components/document.erp5.PDFDocument.py b/bt5/erp5_dms/DocumentTemplateItem/portal_components/document.erp5.PDFDocument.py index 6f552624b74..268f634732f 100644 --- a/bt5/erp5_dms/DocumentTemplateItem/portal_components/document.erp5.PDFDocument.py +++ b/bt5/erp5_dms/DocumentTemplateItem/portal_components/document.erp5.PDFDocument.py @@ -32,7 +32,7 @@ import zope.interface from AccessControl import ClassSecurityInfo 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.document.Image import Image from erp5.component.document.Document import ConversionError @@ -240,7 +240,7 @@ class PDFDocument(Image): frame=page_number, display='identical') if not src_mimetype.endswith('png'): continue - content = str(png_data) + content = bytes(png_data) if content is not None: filename = self.getStandardFilename(format='png') result = portal_transforms.convertToData(mime_type, content, -- 2.30.9