pofider / phantom-html-to-pdf

Highly scalable html to pdf conversion using phantom workers
MIT License
159 stars 33 forks source link

image (png/jpg) not rendered in pdf #63

Closed david-rouchet closed 7 years ago

david-rouchet commented 7 years ago

The generated pdf does not render the images that are in the html, although the temporary generated html file does display them properly. Is there a special settings or method to have them in the pdf?

pofider commented 7 years ago

It should work, but again, this package is just a wrapper around phantomjs and you need to search for your rendering issues there https://github.com/ariya/phantomjs

pofider commented 7 years ago

If you reference local image with file protocol, you need to set the allowLocalFilesAccess:true option https://github.com/pofider/phantom-html-to-pdf#local-options

david-rouchet commented 7 years ago

@pofider Tnx for the feedback. I did that too (the option) but with no more success.

peterdeme commented 6 years ago

FYI - for future reference, this solved the issue for me

https://github.com/pofider/phantom-html-to-pdf/issues/34#issuecomment-383053620