by egnehots · 2y ago · 0 comments
Using html to pdf solutions allow to do the templating in html, where it is pretty much a solved issue.
And as many said, headless chrome is a robust html to pdf solution, even though it feel like a hack.
But, yeah, there seems to be a lack of awareness about these options within corporations. So, kudos to you for addressing a genuine problem!
It's markdown-like (but definitely not exactly CommonMark, don't expect that), with # acting as escape into the world of layout and programming. Templates are just functions that return a datatype called a content block, and so on.
The speed issue is also real, but you can scale horizontally by spawning other chromium instances (with gotenberg containers for ex). Not really efficient but it can certainly help alleviate most of the load...
In C# I'd look to use the Playwright library or perhaps even embed chromium via CerSharp if I were trying to avoid extra processes.