Preferences

We [1] have been using Typst to generate PDF documents in production for a few months, such as invoices and labels. It's generating thousands of documents daily, and I'm glad that some of them are printed and used by people in the warehouse who are doing real work.

I really like the simple syntax that Typst provides. It would be much harder for the PMs to edit the templates if we went with other solutions, such as wkhtmltopdf.

We also looked into other document generation services that provide a WYSIWYG interface, and they are all quite expensive and often lack advanced scripting capabilities.

[1] https://garnercorp.com/


film42
Thanks for your comment! I have a few PDFs that I need to generate for groups of users every so often and since wkhtmltopdf is considered EOL, I've been forced to use chrome (which sucks to manage). I just rewrote that code to use Typst (via the typst gem) and it's so so so much better.
lol768
How have you found the generation performance? It seems like this should really be a perfect fit for this sort of use-case, and I'd hope the memory footprint and speed are all much more competitive than HTML-based approaches.

The team I'm currently working with are using Gotenberg for things which we can afford to take a little while, and C#/Skia for things which need to be reasonably quick.

lizimo OP
Most of the documents are generated in an instant, plus we deployed this on Kubernetes with HPA, so high load isn't an issue.

The main issue I found with an HTML-based approach is that browsers are not designed for papers. It would be very challenging, but still possible [1], to customize the page layout, headers, and footers. Nonetheless, we have even more advanced use cases that only Typst/LaTex could cater to, such as displaying the table header of a table that spans multiple pages on every page.

[1] https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_media_q...

ManBeardPc
I only experienced a couple milliseconds for small documents of 15 pages or so. It’s reasonably fast to show the user the result „immediately“ on changes. Haven’t checked memory usage.

This item has no comments currently.