You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I have been using the serverless-chrome for over a week. I have come across an issue. printPdf function doesn't allow any options. For eg: to create pdf with no margin (or margin: 0). Please help on how to get the pdf with no margin to the end of each side. https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-printToPDF
The text was updated successfully, but these errors were encountered:
Headless Chrome is still rather new and currently doesn't expose any configuration options (paper size, orientation, margins, etc) for printing to PDF. The good news is that people on the Chromium team are working on it. You can follow their progress on pdf-options here. There's a pending code-review here. Once this is merged, hopefully we'll get some options to control margins, etc.
You can get some sense of the what the configuration options will be from the modifications to the Chrome Debugging Protocol here.
adieuadieu
changed the title
Page.printToPdf doesnot obey options.
Page.printToPdf has no configuration options (paper size, orientation, margins, etc)
May 8, 2017
@venkat-rg Looks like the code has been merged. I've updated the chromium headless shell in this repository to the latest. It looks like the DevTools API documentation for Page.printToPDF has also been updated. You can now use these options.
Hi,
I have been using the serverless-chrome for over a week. I have come across an issue. printPdf function doesn't allow any options. For eg: to create pdf with no margin (or margin: 0). Please help on how to get the pdf with no margin to the end of each side.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-printToPDF
The text was updated successfully, but these errors were encountered: