using print-to-pdf option in headless chrome from command line

3,278 views
Skip to first unread message

mar...@gmail.com

unread,
Feb 21, 2018, 9:32:23 PM2/21/18
to headless-dev
Hi All,

I am trying to automate some functionality by using headless chrome from the command line.  I am saving local files to PDF and all that is working fine.  The only issue I have is I need to reduce the scale down to about 80-85 for it to look completely correct.    This is all working fine using non headless chrome using the print dialog, but I need to do this from the command line for automation.  I have been unable to find an option to set this in headless for command line.

Is there such an option ?  

Any help would be greatly appreciated,

Thanks in advance

Eric Seckler

unread,
Feb 22, 2018, 1:16:21 AM2/22/18
to mar...@gmail.com, headless-dev
Print/PDF options (incl. scale) can be specified via devtools only, see Page.printToPDF:

--
You received this message because you are subscribed to the Google Groups "headless-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to headless-dev...@chromium.org.
To post to this group, send email to headle...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/headless-dev/33748154-b4e1-4589-96ea-245a3d9d4cfb%40chromium.org.
Reply all
Reply to author
Forward
0 new messages