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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Carlos Ramos Carreño
erp5
Commits
757f0975
Commit
757f0975
authored
Apr 10, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dms: PDF bytes / str
parent
9ce4e4b6
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 @
757f0975
...
@@ -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