-
Notifications
You must be signed in to change notification settings - Fork 37
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
Thoughts regarding executing ghostscript with stderr_to_stdout: true? #305
Comments
Hi @metabren, may I ask what gs spits out for you? It's completely silent for us.
Alternatively, a |
Hi @maltoe, thank you for getting back to me! This is the only warning I'm getting now:
I was getting a couple of others, but changed from the default of PDF/A-3b to PDF/A-2b and that stopped a couple of them. I'll change it back in the morning (it's evening here) and report back.
I haven't tried this but can tomorrow. Will report back here. |
Hey again @maltoe! Just wanted to report back on my findings. It seems the Calling
Calling
Additionally, I was having a look around some of the other forks, and noticed one of changed the gs compatibility level to 1.7 from 1.4. I tried this, and it removed the
Finally, if I make sure there are no images or emoji present in the original PDF (that Chrome produces), then the warnings disappear.
Haha I was hoping that perhaps you'd have a good idea if we were breaking things or not 😅. No worries though, I can investigate this.
I believe something like this would be beneficial (see my earlier example of changing the compatibility level to 1.7). However, there needs to be some thought / care around this. Sending through bad arguments, for example, would break things. I'll keep digging. |
@metabren the warnings make total sense considering the 1.4 compatibility level, right? :) I remember that we used to need this 1.4 compatibility level as otherwise it wouldn't generate valid PDF/As. Check https://verapdf.org/ for the validator tool. The other warning you receive also makes me warning if you actually get a PDF/A still ("reverting to normal PDF"). With regards to the rest of this line, PDF/As need to only contain images or text colors in some specific color space To be honest, my knowledge of Ghostscript and PDF/A is also somewhat limited. Our set of gs options has been found by lots of trial and error on ghostscript 9.26 or something, so things might have changed. |
looks good without the option #306 |
Hi @maltoe, thank you for your further investigation.
Absolutely! At first I wasn't sure if chrome itself was putting out a < 1.5 PDF, but after making this tweak and seeing the warnings go away it was the logical conclusion.
Strangely enough, this happens any time I have an emoji in the printed page. If I remove all emojis, and all images, no warning.
I'll have a go and report back.
That makes sense. According to the latest gs docs, 1.7 is now the default. I'll let you know how I get on! |
@metabren ℹ️ released v1.16.0 with removed I'm going to close this for now, hope that's ok. Feel free to open a PR for a |
Hey @maltoe thanks for the update. Apologies for not getting back to you sooner. I actually ran into an issue with PDF generation in later versions of GS (it was "cutting off" the top part of text, but only when displayed in Safari / Preview on macOS) so I reverted back to an earlier version. I still may open a PR for |
Hey team, love the library — thank you so much for putting this out there in the world. It's an invaluable part of my app.
I have a question around the logs / errors generated by ghostscript...
Are there any downsides / risks to using the the
stderr_to_stdout: true
option here?I ask because I am constantly getting warnings generated with every PDF generation (using
print_to_pdfa
). I tried updating ghostscript to 10.03.0 but I'm just getting different warnings now, e.g.:They can be silenced with
stderr_to_stdout: true
set, so I was wondering:Thanks again!
The text was updated successfully, but these errors were encountered: