Closed imsuneaik closed 4 years ago
Any WARNING in the console output?
Console shows, GET /static/css/style.css HTTP/1.1" 304 but shortly after GET /static/css/style.css HTTP/1.1" 200
Webpage still able to display elements just without CSS.
No warning along the lines of Failed to load image at ...
?
AFAIK GET /static/css/style.css HTTP/1.1" 304
isn't an output that WeasyPrint generates.
How do you invoke WeasyPrint?
python3 -m weasyprint "$filename.html" "$filename.pdf" is how I'm doing it. I wrote a big walkthrough for Linux Academy lately (with a link to a github repo with the template I used) if you're interested: https://linuxacademy.com/blog/tutorials/convert-markdown-to-pdf-tutorial/
I'd really like to see the "$filename.html" -- if there is an <img>
tag inside and WeasyPrint finds the image the image will be in the PDF. If WeasyPrint cannot find the image it writes an error to the console.
@imsuneaik Could you please provide your HTML file? We can't solve this issue without your sample.
@craigpla Thanks a lot for this tutorial! :heart:
Oops, I didn't see the message last month. Sorry folks. README.html is up in this repo: https://github.com/linuxacademy/techwriting-cp-posts
I've cloned the repository and launched weasyprint README.html README.pdf
, the images are included in the PDF file and there's no error.
@craigpla @imsuneaik Can I do anything else for you, or maybe close this issue?
Please reopen if needed.
Hi everyone, I was trying to create a html webpage. I have included on my html which can be seen on my localserver. However, upon printing as PDF. The image is missing.