Generating PDFs of the certificates
The Certificate Generator template uses PDF Potion to generate PDFs of certificates.
In order to use PDF Potion, you will need to:
Install the PDF Potion plugin from the Bubble plugin marketplace
Register for an account on the PDF Potion website
Generate an access token in your PDF Potion dashboard and paste it into the 'Access Token' and 'Access Token - dev.' in the 'Plugins' tab of your Bubble editor
You can read more about how PDF Potion works here.
How PDFs of certificates are generated
Whenever a user clicks the 'Create' button on the index page of the template, the 'Create PDF' action is run:

This action tells PDF Potion to create a PDF of the certificate page in the template.
The certificate page has the design of the PDF. It contains 4 different containers, each of which contains a different style of certificate:

Only 1 container is shown in the PDF of the certificate. The 'template' parameter in the 'Page Name' field in the 'Create PDF' action is used to decide which style certificate is shown on the certificate page for the PDFs.
How PDFs are linked to an entry in the database
PDF Potion automatically uploads a PDF of the certificate created by the user to the app's database. You can view PDFs in the 'File Manager' section of the database.
A backend workflow is used to link the uploaded PDF to a specific 'Certificate' entry in the database.
You will need to be on a paid Bubble plan to be able to use backend workflows
See the 'get_pdf' backend workflow below:

You can enable backend workflows by navigating to:
Settings -> API -> Checking the 'Enable Workflow API and backend workflows' option:

Last updated