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.
Issue with
page.setContent
not properly loading relative assets has been fixed: https://github.com/GoogleChrome/puppeteer/issues/728Similar 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.