From 200508be7ffc34a3e7ce383f6f32ad357cb8a9cd Mon Sep 17 00:00:00 2001 From: ben Date: Sat, 29 Sep 2018 22:04:05 +0200 Subject: Fix PDF offset with acrobat-compatibility option. --- PolyglotFile/polyglotszippdf.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'PolyglotFile/polyglotszippdf.py') diff --git a/PolyglotFile/polyglotszippdf.py b/PolyglotFile/polyglotszippdf.py index eadf5d0..4725a74 100644 --- a/PolyglotFile/polyglotszippdf.py +++ b/PolyglotFile/polyglotszippdf.py @@ -81,6 +81,8 @@ class PolyglotSZipPdf(PolyglotPdfZip): k2_stream_offset = new_pdf.get_first_stream_offset() new_pdf.file_offset = offset + if self.acrobat_compatibility: + new_pdf.file_offset = new_pdf.file_offset + 1 pdf_buffer = new_pdf.get_build_buffer() j2 = pdf_buffer[k2_stream_offset + size_k2_stream:] -- cgit v1.2.3