wicked_pdf icon indicating copy to clipboard operation
wicked_pdf copied to clipboard

Add support for --load-error-handling and --load-media-error-handling

Open d4rky-pl opened this issue 1 year ago • 0 comments

Issue description

When generating a PDF that references external assets that then get inlined (for ex. because you rendered the HTML in another part of the application and just pass it to pdf_from_string), if the files fail to load, wkhtmltopdf will not fail by default, causing WickedPDF to generate a broken PDF. This is later hard to detect.

Using raise_on_all_errors: true with log_level: error is unreliable as wkhtmltopdf can output a warning that can be ignored to the STDERR as well (for ex. QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root' is treated as error)

Expected or desired behavior

Right now we can pass --load-error-handling abort --load-media-error-handling abort via extra. It would be great if these were options in WickedPDF config directly

d4rky-pl avatar Jan 05 '24 09:01 d4rky-pl