manuel-rubio
Because I don’t want to continue using wkthmlpdf or chromium/chrome for only exporting a HTML to PDF, I decided to create a library called Press that lets us convert an HTML document directly to PDF. This library was designed for use inside Conta, where we need to generate invoices, and it works very well.
Press is a dependency-free Elixir library for rendering HTML+CSS into PDF, targeting structured business documents: invoices, delivery notes, payslips, and reports. “Dependency-free” means zero runtime dependencies — only modules that ship with OTP itself (e.g.
:zlib) are used.
Check it out and let me know what you think.
Trending in Announcing
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries.
offset-based pagination with...
New
I needed to reuse React components from my Chrome extension in my Phoenix/LiveView backend. I noticed that for Svelte/Vue, there are live...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Hi all!
I want to present a small library which provides a mix task for generating an Entity-Relationship Diagram for Ecto schemas.
You...
New
Hello
Published a new library - ProcessHub!
ProcessHub is a library designed to manage process distribution within the Elixir cluster. ...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself.
My main conc...
New
This showed up on my feed.. anyone heard of it? Just hype?
Ox Alpha is a reasoning model designed for coding, sustained ag...
New
It’s not that it’s vocabulary is too advanced. It’s something worse.
I get lost trying to follow even a paragraph written by Claude. It’...
New
Today we’re releasing Oban for Python. Not an Oban client in Python. Not a pythonx wrapper embedded in Elixir. Nope, it’s a fully operati...
New
@hugobarauna, Dr. Dimitrios Koutmos (my brother) and I (Alex Koutmos) have been hard at work on writing a book on how you can use Elixir ...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #ai
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
Lucassifoni
You’re implementing HTML+CSS rendering à la weasyprint in Elixir ? Interesting, I will monitor it closely.
manuel-rubio
Well, it’s not the first time"crazy" project I do, previously I did myproto to simulate a MySQL server, ephp for putting PHP on top of Erlang, and I rewrote Lambdapad for getting a good website static generator. This time my pain was I don’t want to install chrome on my server and get timeouts when generating a PDF or even worse, dedicate 1GB only for that.
abrookewood
This is great - I was looking for something a while ago and wasn’t really happy with the options. Ended up skipping PDF and just exporting a markdown file as a result. I would definitely have been happier with this!
alvinkatojr
This is great! We had another pdf library for directly working with pdfs and now this one which converts html and css to pdf. Big ups to you and every body else who’s made working with pdfs in Elixir a breeze! Many thanks!
RodolfoSilva
Great!
Personally, with AI, I just use https://typst.app/. It’s a fast and maintainable way to generate PDFs. It has drastically reduced resource consumption and gives me a more standard way to write documents without having to use HTML.
manuel-rubio
Not a bad solution, but I’d like to avoid dependencies on third-party elements for the project where I’m using Press, that’s because I created it. Keep in mind that it was created for even drop internal dependencies like Chrome. Thanks for the info.
olivermt
Typst is a tiny binary and also a standard format similar to latex templates fwiw. But this library you made is still cool as hell imo!
manuel-rubio
Yes, but as I said, I don’t like to run third-party dependencies. If I wanted to do that, I could continue using chromic_pdf using chrome/chromium or wkthmltopdf under the hood. I’m not saying it’s not a good solution, but it’s not the solution I was looking for.
olivermt
That comparison makes it seem like you haven’t looked closely at what typst actually is? The “third party dependency” is an OSS rust nif through rustler that runs super lightweight.
How can you compare that with deploying chromium on the runtime?
Chromic is orders of magnitude better than the other chrome based pdf solutions out there, but it is still an operational nightmare compared to the embedded typst nif.
manuel-rubio
A dependency could be integrated into the code, or you could use it as an external command. If we use chromic_pdf, we depend on Chrome, Chromium, or wkhtmltopdf. If we use typst, we have a dependency on typst; even if that’s not integrated into the code, we need to use it, so we depend on it.
Besides that, I want you to understand I’m not saying Typst is a bad product. I know it’s great for generating nice PDFs from specifications, and it’s very valuable. But my point is: I don’t like internal or external dependencies. That’s all.
And above all, thanks for giving us this heads-up about this tool. For sure, I’ll use it for other projects.