3 ms·
How is this better than writing out an HTML file, then using headless chrome to export to PDF, like this: "C:\Program Files\Google\Chrome\Application\chrom
by breadwinner 3y ago
How is this better than writing out an HTML file, then using headless chrome to export to PDF, like this:
"C:\Program Files\Google\Chrome\Application\chrome.exe" --headless --disable-gpu --print-to-pdf=C:\temp\foo.pdf --no-margins --print-to-pdf-no-header C:\temp\test.mhtml
- Titou325 3y agoThis brings its own set of challenges. Headers and footers are strictly limited in terms of features, you cannot add footnotes, the notion of page spreads is harder to implement. Then you need to combine that with having a Chrome instance at hand + exposing the needed assets for URL resolution. Definitely not difficult let alone impossible, but not the easiest way to get started :)
- breadwinner 3y agoThe easier way costs $0.05 cents per page. Imagine sending an invoice to your customer and the invoice itself costs 5 cents per page! That's prohibitively expensive for many applications. I wouldn't consider any solution that costs more than 1 cent per page.
- Titou325 3y agoWe bill per document, so the number of pages wouldn't impact the pricing. A 5 pages invoice would come at 1 cent per page. However, it seems that each and every company has different needs and the pricing may or may not make sense for them. There are alternative billing options that we are considering but we want to keep it easy to grasp rather than go into billing kilobytes or ms of execution. We would be more than happy to discuss use cases and see what can work for each company :)
- aforwardslash 3y agoSome/most of these problems can be solved by using pagedjs and something like https://github.com/zipreport/zipreport-server https://github.com/zipreport/zipreport-server
- _puk 3y ago"you can already build such a system yourself quite trivially by getting an FTP account, mounting it locally with curlftpfs, and then using SVN or CVS on the mounted filesystem." https://news.ycombinator.com/item?id=8863 https://news.ycombinator.com/item?id=8863