Our great sponsors
-
view_component
A framework for building reusable, testable & encapsulated view components in Ruby on Rails.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
You have a few options when trying to create a PDF in a Rails environment. Prawn and Wicked PDF have been around for quite a while. I have been using both gems and they work fine. However, they have a few limitations that can make it difficult to handle more complex PDFs. I recently discovered Grover, which can remediate some of this inflexibility in creating PDFs.
In fact you can save any existing view as PDF, allowing you to reuse your current HTML and/or CSS framework. You can use Tailwind for your CSS or ViewComponent to display your components and print them to PDF.
You have a few options when trying to create a PDF in a Rails environment. Prawn and Wicked PDF have been around for quite a while. I have been using both gems and they work fine. However, they have a few limitations that can make it difficult to handle more complex PDFs. I recently discovered Grover, which can remediate some of this inflexibility in creating PDFs.
You have a few options when trying to create a PDF in a Rails environment. Prawn and Wicked PDF have been around for quite a while. I have been using both gems and they work fine. However, they have a few limitations that can make it difficult to handle more complex PDFs. I recently discovered Grover, which can remediate some of this inflexibility in creating PDFs.
In fact you can save any existing view as PDF, allowing you to reuse your current HTML and/or CSS framework. You can use Tailwind for your CSS or ViewComponent to display your components and print them to PDF.
There are gems to facilitate handling Prawn PDFs, e.g. prawn-markup which lets you add simple HTML snippets into Prawn-generated PDF.