spiritix/php-chrome-html2pdf

No Umlauts and Images

vfib opened this issue · 5 comments

vfib commented

Hello,
when trying to create a Pdf from http://google.com there are no Images and Umlauts shown. Iam from Germany. This is how it looks.
test.pdf

Is there a way to fix this, and how?

I didn't have any issues so far with my projects. Maybe it's something related to the Google website. Did you experience similar issues with your own websites?

Have the same problem with my own projects, didnt load any images css and js, only html code.
Any ideas?

vfib commented

Couldn't fix it so I'm using browsershot with headless chromium now. Needs node.

Regards

@VitaliyMinenko @vfib Are you guys using the library inside a VM (Vagrant, etc.)? If so, the problem is that the library tries to load the assets from inside the VM. E.g. it performs a request to an URL like this:

http://myhost.local/assets/styles.css

Which is obviously not reachable since your VM cannot resolve myhost.local, in contrast to your browser which performs the request from your host machine.

Closing this, please re-open if issue persist