Forma PDF
PDF generation, document data and API-key security
By WVSTECH · Reviewed November 23, 2026 · Examples target SDK 0.4.0
Normal Forma PDF generation runs in the browser using the supplied layout and values. It does not need an AI provider key. Your application decides whether to store templates, upload generated PDFs or enable optional AI template creation.
Separate three data flows
- Template storage: your app saves original layout JSON and any chosen example values.
- PDF generation: the browser combines layout and values into a PDF Blob.
- AI template creation: a request goes to the configured gateway and selected provider.
Personal and shared API keys
A personal BYOK flow can accept the user's key transiently for a request. Do not put shared company credentials into JavaScript bundles, public environment variables, database responses or example payloads. Protect a shared-key gateway with authentication, authorization, rate limits and request logging that omits credentials.
Authorization belongs to your app
Verify ownership when loading and saving templates. Treat supplied layout JSON as input and validate it before generation. A client-side license or hidden field is not an access-control system.
Images and retention
Use supported embedded PNG/JPEG data rather than assuming arbitrary remote image URLs will be fetched. Decide where uploads and exported files are retained in your application. Browser generation does not by itself make a deployment compliant with every privacy standard.
Read the site privacy notice, validation contracts and SDK integration guide.
Continue building
- Add PDF templates to a Bolt or Lovable project
- Generate a PDF from JSON in the browser
- Embed a visual PDF template editor in JavaScript
- Integrate a PDF editor with React and Next.js
- Save PDF templates as JSON in your database
- Create editable PDF templates in Bubble workflows
- Automatic PDF page breaks for text and tables
- Build a quotation PDF generator for your application
- Create a restaurant menu PDF from structured data
- Generate internal documents and memos from app data
- Generate PDF templates with OpenAI or Claude
- PDF template editor or a simple Generate PDF button?