-
-
Notifications
You must be signed in to change notification settings - Fork 704
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
Rendering issue on MacOS preview #2010
Comments
I've managed to get this down to a small reproducible by playing around with the CSS Bikeshed outputs. If you try and generate a PDF using the following HTML, any text or images in the document will not render using MacOS Preview (even those outside of the problematic tag), and a warning will be generated when trying to check the PDF using QPDF. <html>
<head>
<style>
:root {
--p-text: currentcolor;
}
p {
color: var(--p-text);
}
</style>
</head>
<body>
<p>
Test
</p>
</body>
</html>
|
@liZe Thanks, do you mean #1165 instead of #1175? I'm not very familiar with CSS in PDFs, but is there a way to just not render this specific styling so that the document as a whole would render fine? Is MacOS Preview correct to not render in this case, and other readers are just trying to work around the problem? Also, this should probably be opened as a different issue, but is it worth running a QPDF check during the WeasyPrint processing, to outline warnings like these to the user? Otherwise, there is no output from WeasyPrint to indicate any kind of problem. |
I do (I’ve edited the comment.)
The PDF is broken, that’s a bug in WeasyPrint. It magically works in PDF.js, but it’s broken in some other rendering tools.
We already use Ghostscript to find these kind of bugs, and it also breaks with your example. We didn’t catch the bug earlier because this case wasn’t tested, that’s all. We’ll include a non-regression test when it’s solved! I’m currently trying to fix the problem in a quite solid way. |
We actually don’t fail on Ghostscript errors. Let’s fix that too! |
@FozzieHi the problem should be fixed in |
@liZe Yup, that's fixed the issue. Thanks so much for your help! |
I'm running into a rendering issue on MacOS preview, where neither text, nor images are rendered (but styling such as borders are).
I'm converting a HTML document generated by Bikeshed, and the PDF does display correctly on readers such as Chrome and Firefox, so I'm reporting it here instead of on the Bikeshed repo, but can of course move it to there if need be.
I've attached the HTML document Bikeshed generates, and the output PDF WeasyPrint generates, and can provide more info if needed. Thanks!
index.zip
The text was updated successfully, but these errors were encountered: