

Wicked PDF, created by our good friend and fellow Indianapolis-native Miles Sterrett, is probably the most widely used Ruby HTML-to-PDF library.
#PDFKIT VS PRINCEXML PDF#
For that reason, we don’t recommend using the below libraries unless you’re writing your HTML/CSS specifically for a PDF and are creating a relatively simple document. It lacks support for new CSS and JavaScript functionality, including Flexbox. Unfortunately, the version of Webkit that wkhtmltopdf is forced to use is wildly out of date (2012 era!). Historically, most open-source HTML-to-PDF libraries were based on wkhtmltopdf, which uses the Webkit engine. Still, Grover is likely the easier and better option for most applications. If you need to do advanced page-level manipulation (perhaps if you’re relying on third-party HTML?), Puppeteer-ruby might provide some advantages over Grover. It covers most, though not yet all, of Puppeteer’s APIs. Puppeteer-ruby is a port of Puppeteer to Ruby. It provides some options for page size and margins but overall struggles with the same problems of any browser-based system: limited support for complex PDFs, making it difficult or impossible to format long tables, headers and footers, watermarks properly, or create accessible PDFs, just as a few examples. It can even be configured as middleware to automatically extend your URLs with. The Grover gem uses Puppeteer to convert your Ruby web pages into PDFs (or images). These libraries lack a lot of PDF-specific functionality but allow you to use the latest web technology, like Flexbox, grid layout, and ES6. The open-source HTML-to-PDF libraries with the most modern CSS, HTML, and JavaScript support are based on headless Chrome, typically through Google’s Node Puppeteer project. A third-party wrapper, Princely, is available for Ruby, and pricing starts at $2,500/year. We highly recommend Prince for anyone who doesn’t want to use an external API. They wrote the CSS Paged Media specifications that enable a large percentage of PDF-related functionality. Prince pioneered the HTML-to-PDF technology, and Håkon Wium Lie, the inventor of CSS and CTO of Opera, serves as Chairman of the company. The Prince library, previously named PrinceXML, is the backbone of the DocRaptor service. As you can see from our testimonials page, we’re trusted by some of the largest organizations in the world.

#PDFKIT VS PRINCEXML FREE#
We have a small free plan with larger plans starting at $15/mo or $0.25/document. With DocRaptor, you get high-quality PDFs, guaranteed reliability, and advanced features such as complex headers and footers, powerful page break control, complex table support, accessible PDFs, and much more.ĭocRaptor is an online HTML-to-PDF API.

DocRaptor uses the Prince PDF engine (more on Prince below) along with some additional JavaScript processing and debugging enhancements. While we’re obviously biased, we created DocRaptor because nothing else could get the job done. If you need to create more than a simple one-page report, we’d recommend starting your research with one of the below tools. For that reason, the commercial generators tend to offer the best support for creating advanced PDFs. PDF creation is largely driven by large enterprises with legal requirements or complex publishing needs. Lastly, there are some non-HTML-based libraries. There are also browser-based HTML-to-PDF libraries, based on either Google Chromium or Apple Webkit. These have the highest cost but offer features and generation capabilities that are not available in open-source libraries. At the high-end of the market, there are commercial generators (like DocRaptor). There are a few different categories of PDF generators. We’ll outline some key strengths and weaknesses, but we haven’t used these tools in a production environment, so we urge you to do your own research and find the ideal fit for your needs. Below is our list of the top Ruby conversion tools.
