From b354511ac92c0ec988eef556dd145177b8151564 Mon Sep 17 00:00:00 2001 From: "James R. Barlow" Date: Mon, 9 Dec 2019 13:02:49 -0800 Subject: [PATCH] ghostscript: document need to write to stdout when using txtwrite --- src/ocrmypdf/exec/ghostscript.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ocrmypdf/exec/ghostscript.py b/src/ocrmypdf/exec/ghostscript.py index 1bc96f6e..0f2499e2 100644 --- a/src/ocrmypdf/exec/ghostscript.py +++ b/src/ocrmypdf/exec/ghostscript.py @@ -93,6 +93,9 @@ def extract_text(input_file, pageno=1): else: pages = [] + # Note due to bug https://bugs.ghostscript.com/show_bug.cgi?id=701971 + # Ghostscript <= 9.50 will truncate output unless we write to stdout, so + # don't write to a file. args_gs = ( [ GS,