spiritix / php-chrome-html2pdf

A PHP library for converting HTML to PDF using Google Chrome
MIT License
112 stars 29 forks source link

No Umlauts and Images #14

Closed vfib closed 4 years ago

vfib commented 5 years ago

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?

spiritix commented 5 years ago

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?

VitaliyMinenko commented 4 years ago

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

vfib commented 4 years ago

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

Regards

spiritix commented 4 years ago

@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.

spiritix commented 4 years ago

Closing this, please re-open if issue persist