Getting the file size of a PDF

This article discusses creating PDFs in Bubble applications (using the 'Create PDF' plugin action). If you wish to create PDFs based on a template you have designed in our template editor, please see other sections of the documentation.

You can get the file size of PDFs generated by PDF Potion by modifying the backend workflow you use to link a PDF to an entry in your database.


  • Add a number field to your ‘Report’ data type (or whatever custom data type you’re using)
  • Add a key called ‘size’ to the backend workflow you’re using to process the PDF

  • This key returns the size of the PDF in bytes
  • Save the value returned by the ‘size’ key to your ‘Report’ data type. In this example, I’ve divided the value by 1,000 so that I have the value in KBs

Note: There can be a small difference in the file size value returned by DocuPotion vs. what you’ll see in the ‘File Manager’ section of your Bubble database. However, when you download the file to your computer, the file size matches the DocuPotion value (not the Bubble File Manager value).
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.