-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Labels
Description
Explain the problem.
The intermediary HTML when converting a DOCX or ODT to PDF with WeasyPrint always contains images as paths, even when --embed-resources
is used.
Command to reproduce:
pandoc test.docx --embed-resources --pdf-engine=weasyprint --output=test.pdf
Which fails with:
ERROR: Failed to load image at 'file:///home/monster/Downloads/media/image1.png': URLError: <urlopen error [Errno 2] No such file or directory: '/home/monster/Downloads/media/image1.png'>
The error matches the error you get when you use WeasyPrint directly without using --embed-resources
in the original HTML conversion:
pandoc test.docx --output=test.html
weasyprint test.html test.pdf
The following works correctly:
pandoc test.docx --embed-resources --output=test.html
weasyprint test.html test.pdf
Pandoc version?
3.7.0.2