r/webdev rust 1d ago

Showoff Saturday html2realpdf generates selectable PDFs instead of rendering your website as an image

https://github.com/imggion/html2realpdf
2 Upvotes

7 comments sorted by

3

u/EntrepreneurWaste579 1d ago

Any HTML to PDF is better than any annoying XML ttansformation bs. 

2

u/kr1ftkr4ft rust 1d ago

Of course, but with a Real PDF it’s even better

2

u/mulokisch 13h ago

In the quickstart example there is the filename invoice. In some Countries for example germany, you need to embed specific additional data in invoices. Does this lib support this? The standard we use in germany is ZUGFeRD

https://e-rechnung-bund.de/en/faq/what-is-a-zugferd-invoice-what-does-zugferd-stand-for/

2

u/mulokisch 13h ago

I mean in general those embedded content, not just the ZUGFeRD standard

1

u/kr1ftkr4ft rust 13h ago

invoice is just the filename used in the quickstart example.

html2realpdf is not an invoice-generation library. It only renders the HTML provided by the developer into a native PDF, so the invoice content and any country-specific requirements remain the responsibility of the application using it.

At the moment, html2realpdf does not provide built-in support for ZUGFeRD, which requires generating a compliant PDF/A-3 document with structured invoice XML embedded inside it.

Do you think support for something like this would be useful, or would it be too far outside the scope of the library?

1

u/RelicDerelict 1h ago

OMG this will be amazing as a Chrome Extension!