I'm trying to use chrome headless print to pdf option to print some pdf Files in ubuntu and here's my command line :
google-chrome --headless --disable-gpu --print-to-pdf http://www.google.com
Now if I ran it like that it runs perfecly and the file is generated.
BUT when I add the name of the file after --print-to-pdf :
google-chrome --headless --disable-gpu --print-to-pdf gen.pdf http://www.google.com
an error occur :
[1213/020159.194304:ERROR:headless_shell.cc(605)] Open multiple tabs is only supported when remote debugging is enabled.
Any solution to this ? thx.
You're missing an =
between --print-to-pdf
and gen.pdf
.
This should work:
google-chrome --headless --disable-gpu --print-to-pdf=gen.pdf http://www.google.com
Similar question asked here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With