Forma PDF

Embed a visual PDF template editor in JavaScript

By WVSTECH · Reviewed November 23, 2026 · Examples target SDK 0.4.0

Embed Forma PDF when your users need to design documents themselves. The editor exposes pages, text, images, tables and field bindings; the PDF engine also works independently when users only need a download button.

Mount the editor in a container

Serve the purchased SDK and its styles from your application. Give the host an explicit height so the page list, canvas and property panel have room to scroll.

import { createEditor, getTemplate } from './sdk/forma-pdf.js'

const starter = getTemplate('quotation')
const editor = createEditor(document.querySelector('#pdf-editor'), {
  layout: starter.layout,
  values: starter.values,
  locale: 'en',
  onChange: ({ structure, values }) => {
    saveDraft({ layout: structure, values })
  }
})

Save drafts in your application

saveDraft above is your persistence function, not an SDK method. Debounce it and handle authorization and errors in your application. You can also save explicitly using editor.getEstruct() and editor.getValues(). Call editor.destroy() when removing the component.

Who sees the editor?

Only users to whom your app exposes it. A template designer can use the full workspace while customers see a small form and a Generate PDF button. The public playground is a demonstration, not a mandatory screen in your product.

Continue building

Try the visual editor View the SDK license