html option not usable when using setRemoteInstance #436
Unanswered
spaceemotion
asked this question in
Q&A
Replies: 1 comment
-
I am also getting this problem as described... bumping for a resolution. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to render a custom HTML page via the
html
option. However, due to the set up of my project, I have to use a remote instance instead of a local installation (viasetRemoteInstance
).Since the HTML file is being generated on a different server than the one creating the PDF, puppeteer is throwing the following error:
I know I can generate a URL that can be opened instead, but that requires loading the data twice (apart from me having difficulties with this approach as well, just running into timeouts right now).
Alternative: Render custom HTML via
setContent
(around line 172 in browser.js):While this is a quick proof of concept that works, there is a limit to the payload size. It seems to cap out at around 120k characters. Probably not enough for bigger files.
Thankfully the following call eliminates this issue:
Beta Was this translation helpful? Give feedback.
All reactions