Open hsalazarl opened 4 years ago
I have the same issue at Ubuntu 18.04.5.
Same issue at Ubuntu 20.04
It fails with this exact line:
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
This line is inside the body css
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 1rem; font-weight: 400; line-height: 1.5; color: #212529; text-align: left; background-color: #fff; }
If you remove it, everything works like a charm!
Another approach is to leave only one font-family.. like this:
font-family: "Helvetica Neue";
Thanks for pointing out the exact cause. :)
Does either omitting -apple-system or enclosing it in quotes "-apple-system" have any benefit? I'm wondering if processing is getting confused by the leading "-" and thinking it's a number.
I thought the same as you.. but I tried with two font families (eg. Roboto and Arial) and it didn't work.
wkhtmltopdf version(s) affected: 0.12.6 (with patched qt)
OS information Linux Mint 20
Description Trying to generate a PDF that includes CSS from bootstrap causes a floating point exception. Current output is:
Loading pages (1/6) Floating point exception (core dumped) ] 42%
How to reproduce Including the following in a HTML page causes the issue:
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
Then running:
wkhtmltopdf --enable-local-file-access /path/to/html.html /home/user/out.pdf
or even trying to generate the PDF from the bootstrap page itself:
wkhtmltopdf https://getbootstrap.com/docs/4.4/getting-started/introduction/ /home/user/out.pdf
Expected behavior Should generate a PDF including bootstrap CSS and/or fonts.