Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
4003da20
Commit
4003da20
authored
Apr 10, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dms: PDF bytes / str
parent
127da0a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
bt5/erp5_dms/DocumentTemplateItem/portal_components/document.erp5.PDFDocument.py
...mplateItem/portal_components/document.erp5.PDFDocument.py
+2
-2
No files found.
bt5/erp5_dms/DocumentTemplateItem/portal_components/document.erp5.PDFDocument.py
View file @
4003da20
...
@@ -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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment