Python2/3 compatibility on merging pages with eps img into single page
This commit is contained in:
parent
7456f0acea
commit
b06ac57a6f
|
@ -2,3 +2,5 @@
|
|||
*.swp
|
||||
.DS_Store
|
||||
build
|
||||
.idea/*
|
||||
|
||||
|
|
|
@ -2724,14 +2724,14 @@ class ContentStream(DecodedStreamObject):
|
|||
def _getData(self):
|
||||
newdata = BytesIO()
|
||||
for operands, operator in self.operations:
|
||||
if operator == "INLINE IMAGE":
|
||||
newdata.write("BI")
|
||||
dicttext = StringIO()
|
||||
if operator == b_("INLINE IMAGE"):
|
||||
newdata.write(b_("BI"))
|
||||
dicttext = BytesIO()
|
||||
operands["settings"].writeToStream(dicttext, None)
|
||||
newdata.write(dicttext.getvalue()[2:-2])
|
||||
newdata.write("ID ")
|
||||
newdata.write(b_("ID "))
|
||||
newdata.write(operands["data"])
|
||||
newdata.write("EI")
|
||||
newdata.write(b_("EI"))
|
||||
else:
|
||||
for op in operands:
|
||||
op.writeToStream(newdata, None)
|
||||
|
|
Loading…
Reference in New Issue