alvarcarto / url-to-pdf-api

Web page PDF/PNG rendering done right. Self-hosted service for rendering receipts, invoices, or any content.
MIT License
7.01k stars 774 forks source link

Directly set html content #95

Closed justisb closed 5 years ago

justisb commented 5 years ago

Issue with page.setContent not properly loading relative assets has been fixed: https://github.com/GoogleChrome/puppeteer/issues/728

Similar workaround in another project that has been removed: https://github.com/joelgriffith/browserless/pull/106

Using setContent instead of a data url should also fix the escaping issue presented by https://github.com/alvarcarto/url-to-pdf-api/issues/90. I was actually running into that problem myself so went looking for a solution, to find this workaround unnecessary since the core issue has been resolved.

FWIW I've been running this PR's branch in production with success. The failing test is also failing on master, I could rebase once that has been resolved.

kimmobrunfeldt commented 5 years ago

Thanks for the contribution! This was fixed in https://github.com/alvarcarto/url-to-pdf-api/pull/103, so closing this one.