From 31994258fb48dbbd689a7bbd2a839c479879577c Mon Sep 17 00:00:00 2001 From: "James R. Barlow" Date: Tue, 8 Sep 2020 02:35:16 -0700 Subject: [PATCH] metadata fixup: don't try to update original PDF's metadata with docinfo --- src/ocrmypdf/_pipeline.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ocrmypdf/_pipeline.py b/src/ocrmypdf/_pipeline.py index e2fa7766..a37963e3 100644 --- a/src/ocrmypdf/_pipeline.py +++ b/src/ocrmypdf/_pipeline.py @@ -753,7 +753,9 @@ def metadata_fixup(working_file: Path, context: PdfContext): # Reverse this, because PDF/A TechNote 0003:Metadata in PDF/A-1 # and the XMP Spec do not make this recommendation. if meta.get('dc:title') == 'Untitled': - with original.open_metadata() as original_meta: + with original.open_metadata( + set_pikepdf_as_editor=False, update_docinfo=False + ) as original_meta: if 'dc:title' not in original_meta: del meta['dc:title']