Forma PDF documentation

Bubble integration guide

Current status: the adapter is supplied as integration code. It is not a published or approved Bubble Marketplace plugin. This independent SDK purchase does not install a Marketplace item.

For your own Bubble application

A developer or the app owner sets up the element once. After setup, end users work with visual controls, not JSON or JavaScript. The package contains the callbacks and registration.json, a manual checklist rather than an importable plugin file.

1. Host the compiled files

Serve forma-pdf.global.js and forma-pdf.css from your own HTTPS hosting. Add these tags to the plugin header:

<link rel="stylesheet" href="https://YOUR-HOST/forma-pdf.css">
<script src="https://YOUR-HOST/forma-pdf.global.js"></script>

2. Create a visual web element

In the Bubble plugin editor, create a web element called Forma PDF. Register the fields below and paste initialize.js and update.js into their callbacks. Enable resizing and give the element enough height for a scrolling document view.

PropertyTypePurpose
layout_jsontextSaved document layout
values_jsontextDocument data
localetexten, pt-BR or es

Register states structure_json, values_json, data_contract_json, pdf_url, pdf_base64 and error_message as text; is_generating as yes/no. Register events structure_changed, pdf_ready and error. The included registration checklist also describes the optional AI properties and events.

3. Add the element actions

ActionCallbackInputs
Get structureget-structure.jsNone
Generate PDFgenerate-pdf.jsdownload (yes/no), return_base64 (yes/no), filename (text)

The callbacks use internal state IDs, so keep their technical names exactly as supplied. Generation is asynchronous: use the pdf_ready event for a workflow that needs the result.

4. Load, save and reopen

Create a data type such as DocumentPDF with layout_json and values_json text fields and an owner User. To save, run Get structure and store the element’s corresponding states. To reopen, feed the saved record into the element’s properties. Configure Privacy Rules for the owner. Do not bind an element’s output state directly to its own input property.

5. Test in your app

Use your Bubble test application to check loading, editing, saving, reopening and downloading. Test a longer table and another user account. A blob: PDF URL is temporary; use your own file storage workflow for permanent links or email attachments.

Bubble’s element setup and test process is documented in Building elements. Production access for a private plugin is distinct from a test app; see Publishing and versioning.

For a Marketplace submission

Only a publisher with distribution rights should submit a resellable plugin. A single-application SDK purchase does not include those rights.

Prepare a complete seller profile and support contact, English instructions, an original identity, and a working Bubble demonstration of every advertised feature. The demo must permit inspection in Bubble’s editor. Keep private API keys server-side. Avoid external-product promotions and checkout detours in Marketplace materials. Marketplace purchases use Bubble’s licensing and payment process; this SDK sale is separate. Review the current Marketplace policies before submitting.

A local SDK test is not Marketplace approval. Registration, real-app testing and any Marketplace review must be completed separately. This page is technical documentation, not a Marketplace listing.