Does that mean we'll soon have an alternative to ElectronJS / NWJS based on Firefox ? (Positron :p ?)
Firefox 56 supports headless mode on Windows
41–50 of 88 posts
Re: Firefox 56 supports headless mode on Windows
#42Does that mean we'll soon have an alternative to ElectronJS / NWJS based on Firefox ? (Positron :p ?)
Re: Firefox 56 supports headless mode on Windows
#43I was wondering if I could use this (using a plugin) or Chrome to generate PDF files on the web server. Most of the PDF generation software out there are quite expensive.
[1] https://github.com/marcbachmann/node-html-pdf [2] https://en.wikipedia.org/wiki/Xvfb
Re: Firefox 56 supports headless mode on Windows
#44I was wondering if I could use this (using a plugin) or Chrome to generate PDF files on the web server. Most of the PDF generation software out there are quite expensive.
Latex is free.
Re: Firefox 56 supports headless mode on Windows
#45Does that mean we'll soon have an alternative to ElectronJS / NWJS based on Firefox ? (Positron :p ?)
Re: Firefox 56 supports headless mode on Windows
#46Earlier quoted context omitted.
We use wkhtmltopdf to do this server side. It as a few problems and quirks, but it work well enough for us.
it has a lot of quirks, and, frankly, webkit is pretty bad at printing in general as it lacks a ton of printing specific features like re-printing table headers across page boundaries. There's also only very rudimentary support for page headers and footers. wkhtmktopdf is probably ok if you just need a quick single page invoice printout, but the moment you need more (in our case, we definitely do), I can highly recom…
Here's an example fully rendered in React: https://s3.amazonaws.com/ud-reports/comps-report-86.pdf
And one with svg charts: https://s3.amazonaws.com/ud-reports/chart-report-89.pdf
With -webkit- prefixes you can use even flexbox, and and with js polyfills you'll have all you need.
Of course if I would start a project now, I would use chrome headless, but I don't feel wkhtmltopdf is that bad.
Re: Firefox 56 supports headless mode on Windows
#47It's not very clear how to actually use this in a test environment like Selenium etc. At least with headless Chrome there are libraries now to drive it via the remote debug protocol like https://github.com/LucianoGanga/simple-headless-chrome This feels a little nicer than Selenium as it's one less layer of abstraction. EDIT: guess from other comments WebDriver is the right method to access.
Re: Firefox 56 supports headless mode on Windows
#48Is there a linux headless mode already? Selenium chrome driver headless is pretty much useless in linux because important methods like `send_keys` need X anyway for keyboard mappings or something like that.
Genuine noob question: could you not use Xvfb?
Re: Firefox 56 supports headless mode on Windows
#49I was wondering if I could use this (using a plugin) or Chrome to generate PDF files on the web server. Most of the PDF generation software out there are quite expensive.
Latex is free.
Re: Firefox 56 supports headless mode on Windows
#50Does that mean we'll soon have an alternative to ElectronJS / NWJS based on Firefox ? (Positron :p ?)
It already exists: https://github.com/mozilla/positron
The sometimes really make it hard for us fanboys (prism, Brendan and uncertainty about the future of extensions) :-|