Oicana is a toolset for PDF templating with Typst. Prepare document templates in your favourite typesetter and produce PDFs with different data inputs. It lets you wield the full power of Typst, including its package ecosystem, from your application code. Templates are plain text files that live next to your code, work with version control, and AI can help write them.
Oicana has seven different integrations. You can compile templates from JavaScript/TypeScript (browser and Node.js), C#, PHP, Java, Python, and Rust. Using Oicana is free for personal projects, research, education, and open source. Commercial pricing can be found on the website.
I built this around Typst because it’s perfect for this use case — it deserves a lot more usage in business software. Not a lot of business software uses Rust, which makes it hard to integrate tightly with the Typst compiler. Oicana does that for you - it wraps the compiler and exposes a templating API to other programming languages through FFI and native extensions for maximum performance.
The beta post shows a minimal template and code snippets for the different integrations. Follow the getting started guide in the docs to create a working example application in the tech stack of your choice.
If you have any kind of feedback or questions, please reach out. I’d love discussing the implementation and templating with Typst generally!
It looks great! What I wondered, would this be the right tool for something like this small web app I builtvibe coded: https://tools.eraa.at/buttons/
Basically there are some user inputs and the template is previewed in the browser and can be downloaded as PDF. Is this in scope or would Oicana be more oriented towards server side processing? If it’s in scope, a direct browser example to try out Oicana and see results would imo be nice for your website!
So this is definitely in scope, but whether it’s the right tool depends a bit. If you now have a working app and no plans to support compilation in other places like a backend, then you probably won’t gain much. The main befit from Oicana would be that the templates can be compiled in many different tech stacks.
Yeah I probably wouldn’t rebuild it, unless I want to extend the scope (e.g. being able to load packages) – and then I’d need to feel it’s worth going from open source to source available (at an educational non profit). Yet I think typst is great for these use cases and I’m glad someone built a professional offering for it :)