OCRmyPDF icon indicating copy to clipboard operation
OCRmyPDF copied to clipboard

Inverted black and white from optimization

Open Jmuccigr opened this issue 1 year ago • 9 comments

Working with a PDF that has only tiff images in it, created with ImageMagick and then assembled into a PDF with img2pdf. Forcing no optimization leaves the images ok. Seems like same result as #419.

Jmuccigr avatar Sep 18 '22 14:09 Jmuccigr

Check that you have the latest pikepdf. 5.6.1 introduced a possible fix to some black/white inversion issues.

jbarlow83 avatar Sep 18 '22 18:09 jbarlow83

I've got 6.0.2.

Jmuccigr avatar Sep 19 '22 10:09 Jmuccigr

Any thoughts?

Jmuccigr avatar Sep 25 '22 11:09 Jmuccigr

Thoughts

  • it's hard to get monochrome right because there are various options to invert that are not always respected by all programs
  • because of the above, it's hard to investigate without a PDF
  • you could use qpdf's new --json features as a way of showing me the structure of the PDF without the content
  • using a heuristic is really tempting
  • I don't know when I'll have bandwidth

jbarlow83 avatar Sep 28 '22 05:09 jbarlow83

Any updates on this issue? I have similar problems and the version of pikepdf is 6.2.1

alirf81 avatar Oct 24 '22 10:10 alirf81

@alirf81 If you'd like to move things along faster please submit a reproducible example PDF and conmand line.

jbarlow83 avatar Oct 24 '22 10:10 jbarlow83