From 5c8a007f3ed8d15c7dc2a815c7692d544fb6b103 Mon Sep 17 00:00:00 2001 From: "James R. Barlow" Date: Fri, 4 May 2018 13:34:34 -0700 Subject: [PATCH] Fix failure to prevent use of Ghostscript on /UserUnit files --- src/ocrmypdf/pipeline.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ocrmypdf/pipeline.py b/src/ocrmypdf/pipeline.py index 9cc7226e..5f185864 100644 --- a/src/ocrmypdf/pipeline.py +++ b/src/ocrmypdf/pipeline.py @@ -222,7 +222,7 @@ def repair_and_parse_pdf( pdfinfo = PdfInfo(output_file) - if pdfinfo.has_userunit and options.output_type == 'pdfa': + if pdfinfo.has_userunit and options.output_type.startswith('pdfa'): log.error( "This input file uses a PDF feature that is not supported " "by Ghostscript, so you cannot use --output-type=pdfa for this "