Tutorial: Making PDF's in Retool

Hi all!

@KLP and the Bold Tech team just made this neat tutorial on how to make PDFs in Retool and wanted to share. :slight_smile: I know @bradlymathews also has one on carbone.io for generating reports. You can find his here: How to Print a PDF?

Here is the gist if you don't have time to read it (the tutorial goes in-depth for all of these)

  • Within Retool, you can use the resource query option, ‘PDF Exporter’, to make PDFs using Markdown. The PDFs can be downloaded directly to your PC, but it isn’t possible to generate unique file names, and, as it does not allow for HTML, formatting can be an issue.
  • Also directly in Retool, the ‘downloadPage utility’ can be run using a JavaScript query to generate PDFs of all or part of your current Retool page, much like a screenshot. It allows unique filename generation, but if you require formatting above and beyond what is on the current Retool page you will find this quite limiting.
  • An external API for PDF generation (such as APITemplate) can help you to overcome the drawbacks of the first two methods, if what you are looking for is more elaborate formatting capabilities and the ability to easily reference your Retool data in the PDFs (which is likely). It requires more steps to set up than the above two methods, but those steps are fairly straightforward and the benefit is getting a PDF that looks the way you want and includes the data you need.

You can read the full tutorial here: https://www.boldtech.dev/posts/creating-pdfs-in-retool

Let us know if there is a way that we should add or if you have any questions! :slight_smile:

7 Likes

Hey all! That's me!
I had a lot of fun making this tutorial and hope it helps some folks. Please don't hesitate to contact me if you have questions :grinning:

4 Likes

Thanks for sharing @KLP! APITemplate is an excellent product, let's give them a hand on Product Hunt! API Template - Generate images and PDFs with simple API | Product Hunt

1 Like