How to send a PDF via email

How to generate a PDF and send it via email from your bubble in 8 steps:

  1. Install the PDF Creator plugin

2023-04-14 19.58.41

  1. Drop the PDF Creator element on the page that has the element you want to PDF

2023-04-15 11.31.04

  1. Ensure the “Expose the option to add an ID attribute to HTML elements” option is ticked under Settings → General

2023-04-14 20.02.28

  1. Add an ID Attribute to the element you want to PDF and send via email. In this instance, we’re adding an ID Attribute (“table”) to a repeating group that has data on a number of employees in a company.

2023-04-15 11.37.06

  1. Trigger the “Generate a PDF Creator” workflow action (in this case we’re doing it via a button)

2023-04-15 11.40.53

  1. Add the ID Attribute from step 5 to the ID Attribute field of the workflow action and set the Scale value (this sets the tradeoff between PDF quality and file size/time to generate - I suggest starting with a value of 2).

2023-04-15 11.44.02

  1. Create another workflow on the same page that uses the “A PDF Creator recorded” event that comes with the plugin. This is a custom event that gets triggered anytime you create a PDF.

2023-04-15 11.54.02

  1. Add a workflow action that sends an email when the “A PDF Creator recorded” event is triggered. Set the recipients email address and click the “Attach file” button. Set the file to be “PDF Creator A’s url”

2023-04-15 13.02.35

And that’s it! Whenever you trigger the “Generate a PDF Creator” workflow, you’ll be sending an email from your bubble app with the PDF attached.

2023-04-15 13.04.44

2023-04-15 13.05.15

I’ve made the editor of the app that was used for this tutorial open for everyone to view - you can see it here.

Other resources

  • I have a detailed video tutorial on how to use the PDF Creator plugin. It shows you the various ways you can use the plugin to create PDFs.
  • I also built a demo app that goes through all the ways you can use the plugin. You can view the app at this link. The editor behind the app is also available to view at this link.

  • The PDF Creator plugin page is available at this link

How would you do this on a backend workflow? Like if you want to generate pdf statements at the end of the month to e-mail to users?

Thank you for sharing this, and I really appreciate the effort behind the feature so far.

Just to add some constructive context that may help clarify the request: vector graphics are resolution-independent, meaning they stay perfectly sharp at any size because they are based on mathematical paths, whereas raster graphics are pixel-based and lose quality when scaled or printed.

At the moment, the generated PDF appears to be rasterized, which results in noticeably lower output quality and falls below typical industry standards for professional documents, especially when printing or zooming.

Would it be possible to enable PDF creation using vector data instead, so text and shapes remain crisp and scalable? This enhancement would significantly improve the overall quality and usability of the exported PDFs.

I’m afraid it isn’t possible to do this using the approach I outline in the post. It uses my PDF Creator plugin which generates PDFs in a front-end workflow.

However, I do have another PDF solution called DocuPotion. It allows you to generate PDFs in a backend workflow and email them to users. You can see an example of how to schedule PDF generation (via a backend workflow) at 22:15 in this video.

There’s also an example of how to send PDFs via email in the documentation - see this article.

Hope that helps and if you’ve any other questions just let me know :slight_smile:

Hi @Nakita, this is unfortunately a limitation of the underlying library that PDF Creator is built on. All elements are effectively transformed to an image before being added to the PDF, which in some cases can result in a loss of quality.

If you need higher quality PDFs I would suggest checking out my other Bubble PDF solution, DocuPotion. The output PDFs are of very high quality and the plugin comes with several options to control the quality of your PDF.

Hope that helps and if you have any other questions just let me know.

Alex