aboutsummaryrefslogtreecommitdiffstats
path: root/PolyglotFile/polyglotszippdf.py
diff options
context:
space:
mode:
Diffstat (limited to 'PolyglotFile/polyglotszippdf.py')
-rw-r--r--PolyglotFile/polyglotszippdf.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/PolyglotFile/polyglotszippdf.py b/PolyglotFile/polyglotszippdf.py
index 0796946..eadf5d0 100644
--- a/PolyglotFile/polyglotszippdf.py
+++ b/PolyglotFile/polyglotszippdf.py
@@ -28,8 +28,9 @@ from PdfFileTransformer import Pdf
class PolyglotSZipPdf(PolyglotPdfZip):
- def __init__(self, Pdf, Zip):
+ def __init__(self, Pdf, Zip, acrobat_compatibility):
super().__init__(Pdf, Zip)
+ self.acrobat_compatibility = acrobat_compatibility
def get_rebuild_zip_first_part_size(self):
@@ -82,7 +83,11 @@ class PolyglotSZipPdf(PolyglotPdfZip):
new_pdf.file_offset = offset
pdf_buffer = new_pdf.get_build_buffer()
j2 = pdf_buffer[k2_stream_offset + size_k2_stream:]
- new_zip.add_data_to_file(b'', j2, True)
+
+ if self.acrobat_compatibility:
+ new_zip.add_data_to_file(b'\x00', j2, True)
+ else:
+ new_zip.add_data_to_file(b'', j2, True)
return new_zip.buffer