UB-Mannheim / ocrd_pagetopdf

OCR-D wrapper for prima-pagetopdf
Apache License 2.0
7 stars 5 forks source link

workaround for pagetopdf.jar exceptions #18

Closed bertsky closed 2 years ago

bertsky commented 3 years ago

Currently, the PageToPdf.jar backend from PRImA does not signal exceptions with a non-zero exit status, cf. https://github.com/PRImA-Research-Lab/prima-page-to-pdf/issues/5.

Could we try to do some workaround this from here for the time being?

Options I can see:

kba commented 3 years ago

Options I can see:

  • parse stdout for exceptions
  • check the resulting PDF file to be non-zero in size (i.e. -s "$out_file" instead of -f "$out_file")

I think the second solution is probably the least-hacky :+1: