-
Notifications
You must be signed in to change notification settings - Fork 499
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
PDF generated despite an error on an image #867
Comments
running into the same issue. |
I strongly encourage you to use the gmagick integration documented here https://github.com/asciidoctor/asciidoctor-pdf#supporting-additional-image-file-formats when working with PNG images. Prawn only has rudimentary support for PNG by default.
The policy of the Asciidoctor processor is not halt because of a content error. Right now you have to check for warnings on stderr, but in the future we'll have a logging and document errors facility. |
Thank you for your answer but |
In this case, it's really just a warning...and may not affect the image at all. Just verify that the image looks correct. If you want to make the warning go away, just reencode the image without interlace support, or reencode it to jpg. |
Yes this is what I am doing.
by
Jérôme |
This traces back to asciidoctor/asciidoctor#44. It's Asciidoctor's policy not to throw errors on conversion of a document for a warning or error...because that puts a road block in the writing process (I'm talking about content errors here, not program errors). But once we collect errors and warnings (instead of just printing them), then we have the ability to provide gates that can control how to handle this condition. But I'm not going to make a change for this one issue when the discussion is much broader. |
What I encourage you to do right now is capture the stdout coming from Asciidoctor and fail the build if there are messages printed. There are several projects out there that provide a script for this. |
Asciidoctor PDF now uses the Asciidoctor logger. So if you want to fail on warnings, you can check if any warnings were logged and fail. The Maven plugin happens to have a hook for this. |
Hi,
I have a problem with the alpah.15 version (but I don't know since which version this problem exists).
Previously when there was an error on an image, the generation of the PDF was interrupted.
Today, in the logs I can have this error
ErrorNotification.js:122 [node-error 8:33:59 AM] asciidoctor: ERROR: could not embed image: F:/Documentations/asciidoc/sources/fr/resources/images/EVO-AA/image052.png; PNG uses unsupported interlace method
but the PDF file is still generated.
Is this a desired evolution or a bug?
Where should I make changes so that the generation hangs in case of error?
Thank you.
Jérôme
The text was updated successfully, but these errors were encountered: