sib-generator alternatives
@matthieu and @manonbou pointed out that this tool cannot work. Indeed, custom-elements are not taken into account when converting to PDF.
They then suggest using the PDF printer now available on most browsers and OS on the market. https://git.startinblox.com/components/sib-invoicing/blob/abd6eb99/solid-invoicing.js#L37-61
This works very well but @Marjolaine finds it a bit cheap for our customers:
- The user clicks on "view invoice (PDF)" and a print window appears, he will then have to choose "PDF printer" to generate his document, the document doesn't open, so he will have to go and look for it in these document folder.
- by default the browser adds mentions in the corners of the document (title, url, datetime, pages) which are not very nice.
Alternatives
Client side
- Can we modify HTML before converting it to replace custom elements with divs?
Server side
- A server side solution need a headless browser to convert a html fragment to pdf. is there a easy solution to do that in django?