Cli argument for print page or generate pdf command in Firefox headless mode
UNCONFIRMED
Unassigned
Status
()
People
(Reporter: murznn, Unassigned)
Tracking
Firefox Tracking Flags
(Not tracked)
Details
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0 Build ID: 20170828095647 Steps to reproduce: Please add command line argument for print page (or export to PDF) in Firefox headless mode, like 'screenshot' function. Printing and generating pdf are more useful that pixelized screenshot.
Google Chrome already have command for generate PDF: https://developers.google.com/web/updates/2017/04/headless-chrome chrome --headless --disable-gpu --print-to-pdf https://bugzilla.mozilla.org
Here https://addons.mozilla.org/en-US/firefox/addon/cmdlnprint/ is addon for printing in Firefox from command line, but it isn't work on fresh Firefox versions.
Component: Untriaged → Headless
Updated•a year ago
|
Priority: -- → P3
Comment 3•a year ago
|
||
Suggestion: this should also use "@media print" for the CSS rules. (That's what all the other tools: chromium, wkhtmltopdf, phantomjs, slimerjs do]
Oooh this would definitely be a nice to have. The problem is that of IE, Firefox and Chrome, chrome was definitely in last place when it came to PDF generation. (IE did a bit better than Firefox when it came to layout it seemed, at least on the Windows machines we had to support but Firefox was close second) Chrome's main fail is multi-page tables with page-break-before rules inside the table to ensure sections were on same page. Or just sane rendering of thead period. It would overlap content and other absurdities. Ended up hacking in fragile multi-table fragmentation of long tables just to get something chrome could manage to print. Firefox' long-standing print fail has been iframes, but that's rarely an issue with the kind of documents I'd need to export to PDF, and is much much more easily worked around in a JS iframe remover. So, yeah, if I had a headless Firefox option it would be a lovely replacement for all the other ones mentioned here which rely on webkit.
You need to log in
before you can comment on or make changes to this bug.
Description
•