-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inverted black and white from optimization #1015
Comments
Check that you have the latest pikepdf. 5.6.1 introduced a possible fix to some black/white inversion issues. |
I've got 6.0.2. |
Any thoughts? |
Thoughts
|
Any updates on this issue? I have similar problems and the version of pikepdf is 6.2.1 |
@alirf81 If you'd like to move things along faster please submit a reproducible example PDF and conmand line. |
Hi there. Thank you so much for working on and maintaining this project. I have been experiencing a similar issue: When I try to optimize a particular pdf (without performing OCR) and to have it be converted into a regular pdf (rather than pdf/a), the resulting pdf also inverts black and white. I have tried it on two pdfs (of scanned books) so so far, and it keeps happening to one of them, which has a little bit of a black margin on every other page (don't know if that's relevant). I use the following input:
If I do it without I am running macOS 12.6.1, and OCRmyPDF 14.0.1; and just homebrew updated/upgraded everything. As you probably can tell I'm not a superuser, so I don't know how to get the structure of pdfs, etc. If I'm not using the best command to optimize an already ocred pdf and have it saved as a regular pdf, I'd appreciate your help on that as well. Is there a way to quickly verify whether a pdf is regular or pdf/a on macos, without using, say, Adobe Acrobat? Many thanks! |
Hmm, if I use pdfimages to extract the image from my PDF, it produces a ccitt/params pair which, when I use fax2tiff on, produces the same kind of inverted image. If I tell pdfimages to output a png, the image has the expected colors. |
[I had to delete and repost this comment because I made a mistake and uploaded the wrong files. Sorry…] Here is an example, with everything that lead to its creation. It’s a blank page, but all the pages with text from the same original file created using the same process got inverted in the end.
Here are all the files, except Versions:
|
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.
The text was updated successfully, but these errors were encountered: