Add 'auto' output type for best-effort PDF/A without Ghostscript
- Add new '--output-type auto' option (now the default) that produces best-effort PDF/A without requiring Ghostscript - When verapdf is available, use speculative PDF/A conversion - Without verapdf, pass through as PDF/A if safe (input claims PDF/A or --force-ocr was used), otherwise output as regular PDF - Make Ghostscript check conditional - only required for pdfa* output types - Update soft error tests to explicitly use --output-type pdfa since they exercise Ghostscript failure modes - Fix Tesseract OSD error handling to check both stdout and stderr for known non-fatal messages like "Too few characters"
This commit is contained in:
@@ -41,6 +41,8 @@ def test_render_continue_on_soft_error(resources, outpdf):
|
||||
exitcode = run_ocrmypdf_api(
|
||||
resources / 'francais.pdf',
|
||||
outpdf,
|
||||
'--output-type',
|
||||
'pdfa', # Required to trigger Ghostscript PDF/A generation
|
||||
'--continue-on-soft-render-error',
|
||||
'--plugin',
|
||||
'tests/plugins/tesseract_noop.py',
|
||||
@@ -55,6 +57,8 @@ def test_render_stop_on_soft_error(resources, outpdf):
|
||||
exitcode = run_ocrmypdf_api(
|
||||
resources / 'francais.pdf',
|
||||
outpdf,
|
||||
'--output-type',
|
||||
'pdfa', # Required to trigger Ghostscript PDF/A generation
|
||||
'--plugin',
|
||||
'tests/plugins/tesseract_noop.py',
|
||||
'--plugin',
|
||||
|
||||
Reference in New Issue
Block a user