Key Takeaways

- Typst with serverless Rust drops PDF render latency from seconds to under 2ms
- Git and Docker workflows for template registries enable compliance auditing in regulated industries
- Legacy PDF pipelines using Puppeteer or LaTeX struggle with memory, speed, and debugging at scale
Erik Steiger, a senior software engineer, presented a case for replacing legacy PDF generation stacks with Typst and Rust. Speaking at InfoQ Dev Summit Munich, he showed how regulated industries like banking and manufacturing can cut render latency from seconds to under 2 milliseconds while gaining compliance-friendly version control.
Why legacy PDF pipelines break at scale
Steiger shared two painful experiences from consulting work. At a German bank, the PDF pipeline had degraded to the point where customers waited days for transaction documents. That's not just bad UX. German regulators told the bank it violated compliance rules. The team explored AWS Lambda, but after two years they were still wrestling with Java-based pre-compiled templates. Steiger suspects they haven't shipped yet.
The second case came from manufacturing. A truck couldn't leave a facility because a weighing slip wouldn't print. Debugging required jumping through two VPNs to a remote desktop just to confirm an error existed. No version history. No clear template ownership. No way to trace which template version produced which document.
Both problems stem from the same architectural choices. Puppeteer spins up headless Chrome to render HTML to PDF, eating memory and taking seconds per document. LaTeX offers precision but punishes you with cryptic errors and slow compilation. Neither approach plays well with modern serverless infrastructure or audit trails.
What Typst changes about document generation
Typst is an open-source typesetting system created by Martin Haug and Laurenz Mädje, two German students who started the project in 2019 and released it publicly in 2023. They built it because LaTeX, despite 40 years of dominance, remains hostile to newcomers and painfully slow to iterate on.
Typst compiles incrementally. Change one line, and you see the result in milliseconds. The syntax is simpler than LaTeX but still expressive enough for academic papers, invoices, and compliance documents. More importantly for Steiger's use cases, Typst is written in Rust. That means it compiles to small, fast binaries that fit comfortably in serverless functions.
Steiger's architecture pairs Typst with a Rust-based serverless setup. The result: render latencies below 2 milliseconds. For a bank generating millions of PDFs per day, that's the difference between a pipeline that scales horizontally and one that chokes under load.
Git and Docker for template compliance
Speed alone doesn't solve regulated industries' second problem: knowing which template version produced which document. Steiger's approach treats templates like code. Store them in Git. Version them. Review changes through pull requests. Tie each generated PDF to a specific commit hash.
For deployment, Docker containers package each template version. When a regulator asks "what did the weighing slip look like six months ago," you pull the container and render it. No guessing. No archaeology through email threads.
This is standard practice in application development. It's surprisingly rare in document generation, where templates often live in databases or shared drives with no history.
Where this approach fits and where it doesn't
Typst excels at structured documents: invoices, certificates, reports, forms. If your PDF is fundamentally a data merge into a fixed layout, Typst handles it well. The language supports conditionals, loops, and custom functions, so complex logic is possible without escaping to an external preprocessor.
It's less suited for documents that need pixel-perfect reproduction of arbitrary HTML. Marketing teams that want to render a webpage as a PDF will still reach for Puppeteer or its faster cousin Playwright. But those teams aren't generating millions of documents per day. For high-volume transactional documents, the tradeoff favors Typst.
Logicity's Take
Steiger's talk highlights a gap in enterprise tooling. Most PDF generation advice targets either hobbyists (use wkhtmltopdf) or enterprises with bottomless budgets (buy Adobe's server tools). Teams in the middle, generating hundreds of thousands of documents with compliance requirements, have been stuck duct-taping Puppeteer containers together. Typst won't replace every PDF workflow, but for document-heavy fintech, logistics, and manufacturing, it's worth benchmarking against your current stack. The open-source license means you can prototype without procurement cycles.
Getting started with Typst in production
Typst offers a CLI and a web editor at typst.app. For server-side use, the Rust crate compiles Typst documents programmatically. Steiger's serverless approach wraps this crate in an AWS Lambda or similar function, accepting JSON data and returning a PDF binary.
The learning curve is gentler than LaTeX. Typst's documentation covers common patterns, and the error messages are human-readable. Teams with LaTeX experience will find the transition straightforward. Teams currently using HTML-to-PDF converters will need to rewrite templates, but the performance gains may justify the investment.
Frequently Asked Questions
How fast is Typst compared to Puppeteer for PDF generation?
Steiger reports sub-2ms render times with Typst and Rust, compared to seconds for Puppeteer. The exact speedup depends on document complexity and server configuration.
Can Typst replace LaTeX for academic papers?
Yes. Typst supports mathematical notation, citations, and multi-column layouts. Several academic journals now accept Typst submissions alongside LaTeX.
Is Typst production-ready for enterprise use?
Typst is open-source and actively maintained. Companies in regulated industries are using it, as Steiger's examples show. Evaluate it against your specific compliance and support requirements.
What's the difference between Typst and Markdown for documents?
Markdown is a lightweight format for simple text. Typst is a full typesetting language with precise layout control, scripting, and native PDF output. It's closer to LaTeX than to Markdown.
Another example of infrastructure tooling attracting serious investment
Need Help Implementing This?
If your team is evaluating document infrastructure or struggling with PDF generation at scale, reach out to Logicity. We connect engineering leaders with the technical expertise to modernize legacy pipelines.
Source: InfoQ
Manaal Khan
Tech & Innovation Writer
Produced with AI assistance and reviewed by the Logicity editorial team. Learn more in our Editorial Policy.
Related Articles
Browse all
GitHub Copilot CLI: What Business Leaders Need to Know
GitHub's AI-powered command line interface is changing how developers work, with early adopters reporting significant productivity gains. Here's what decision-makers should understand about this tool's business impact and whether it's worth the investment for your engineering team.

URGENCY: IT-Tools Revolutionizes Development with Unified Platform - The New Stack
IT-Tools is changing the game for developers by bringing numerous useful tools into one convenient location. According to The New Stack, this platform is a must-have for any development team. We dive into the details of what makes IT-Tools so special and how it can benefit your workflow.

SURPRISING TAKE: Why Agentic Coding Is Not a Threat But a Catalyst for Developer Growth
The coding landscape is evolving with agentic coding, a shift that's both exciting and intimidating for many developers. We explore why embracing this change can lead to unprecedented growth and innovation. By understanding the core of agentic coding, developers can position themselves at the forefront of the tech revolution.

SURPRISING TAKE: Experienced Open-Source Developers Are Not As Productive With Early-2025 AI As You Think
We dive into the impact of early-2025 AI on experienced open-source developer productivity, exploring the challenges and opportunities that come with AI adoption. According to McKinsey, AI can increase productivity by up to 40%, but is this true for experienced open-source developers? We examine the data and expert insights to find out.


