r/rails • u/Sea_Pianist_9694 • 9h ago
A maintained drop-in for wkhtmltopdf: same command, so wicked_pdf apps keep their templates
I built marqius-wkhtmltopdf with my company. It is a drop-in replacement for wkhtmltopdf, built from scratch on its command line.
What it has that the Chromium routes do not: the command and the options are the same, so the templates in a wicked_pdf or PDFKit app stay as they are. There is no browser to run. It is one statically linked file.
In a Rails app it is one line in the Gemfile, in place of `gem "wkhtmltopdf-binary"`:
gem "marqius-wkhtmltopdf"
wicked_pdf and PDFKit find the program by themselves. It installs on Heroku-24, Debian 13, Alpine and macOS on Apple silicon. I ran it today on Ubuntu 22.04, Ubuntu 24.04 and macOS.
I am glad to hear where a PDF of yours prints differently. That is the feedback we work from.
Gem: https://rubygems.org/gems/marqius-wkhtmltopdf
Guide: https://marqius.com/wkhtmltopdf/rails-ruby/
Disclosure: I build Marqius. The Community licence is free for personal and open-source projects; the commercial licence is for businesses. Plans and licences: https://marqius.com/wkhtmltopdf-buy/
6
u/IGotRangod 7h ago
Why this over https://github.com/waka/sghtmltopdf ?
2
u/Easy-Comfortable-587 2h ago
The rendering of some of the fonts in wicked pdf are not upto to the standard so better if you can improve that.