From 922a107b7ff124979546e0613fea494896d19280 Mon Sep 17 00:00:00 2001 From: "James R. Barlow" Date: Sat, 13 Apr 2019 00:24:03 -0700 Subject: [PATCH] Remove safety traversal of PDF table of contents qpdf fixed the danging reference issue (qpdf #240) in 8.3.0, which is required by pikepdf 1.1.0. We no longer need the workaround. --- src/ocrmypdf/_weave.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/ocrmypdf/_weave.py b/src/ocrmypdf/_weave.py index 4ea07e4c..86119ef9 100644 --- a/src/ocrmypdf/_weave.py +++ b/src/ocrmypdf/_weave.py @@ -322,12 +322,6 @@ def weave_layers(infiles, output_file, log, context): pdfinfo = context.get_pdfinfo() pagerefs = {} - # Walk the table of contents first, to trigger pikepdf/qpdf to resolve all - # page references in the table of contents. Some PDF generators put invalid - # references in the ToC, so we want to resolve them to null before we - # create any references, or the ToC will be corrupted - _traverse_toc(pdf_base, None, log) - procset = pdf_base.make_indirect( pikepdf.Object.parse(b'[ /PDF /Text /ImageB /ImageC /ImageI ]') )