# Embedded PDF editor — PDFBetter

> Embed PDFBetter's editor in your site or app with one script tag: visitors fill, sign and annotate PDFs with no account; you get the PDF and field values.

HTML version: https://pdfbetter.com/features/embedded-pdf-editor/

### Embed PDF filling and signing in your own product with one script tag

URL: https://pdfbetter.com/features/embedded-pdf-editor/ · Status: Available · Updated: 2026-11-09

Add PDFBetter's editor to your website or app with a script tag or an iframe. Your visitors open a PDF (from a link, a file your page already has, one of your templates, or a blank page), fill its fields, sign, add text, check marks and dates, and press Submit. They never create a PDFBetter account. Your page receives the field values and a link to the flattened PDF through postMessage, your server can receive the same submission as a signed webhook, and the file is stored in your account for 30 days. It is part of the Enterprise plan ($399 a month, or $299 a month billed yearly, prices in USD).

**How do I embed a PDF editor in my website?**

Add your website in Settings → Embedded editor, create a publishable key (pb_embed_…), load /embed.js and call PDFBetter.embed({ container, key, url }). Visitors fill, sign and submit without an account; your page gets the values in onSubmit and your server can get a signed webhook. It's included in Enterprise: 20,000 documents a month on up to 25 websites.

**Can users fill and sign a PDF inside my app without creating an account?**

Yes. Each embed runs on a short-lived session token bound to one document and your website, so visitors never sign up or sign in. The submitted PDF and values belong to your PDFBetter account and are kept 30 days.

#### One script tag, or a plain iframe

The script (`/embed.js`, no dependencies) gives you `PDFBetter.embed({ container, key, url })` for an inline editor and `PDFBetter.open({...})` for a full-screen modal. It reports `ready`, `document_loaded`, `submitted`, `closed` and `error` to your callbacks.

Prefer plain HTML? An iframe pointing at `/embed/editor/?key=…&url=…` works too. Listen for the editor's messages with a `message` listener that checks the origin.

1. **Allow your websites** — In Settings → Embedded editor, list the exact addresses that may show the editor (up to 25), such as https://portal.example.com. http://localhost works for testing.
2. **Create a publishable key** — The key starts with pb_embed_ and is safe to put in your page: it can only open editor sessions, and only on the websites you listed.
3. **Paste the snippet** — Copy the script or iframe snippet from settings, point it at your PDF, and choose the tools to show: fill, sign, text, check and date.
4. **Receive submissions** — Handle onSubmit in the page, add a webhook for the embed.document_submitted event, or download submissions from settings.

#### Developer reference

Options: `key` (required), one source (`url` for a public https PDF, `file` for bytes your page already has, `document` for one of your PDFBetter documents or templates by id, or `blank`), `tools` (any of fill, sign, text, check, date), `locale` (en, es, fr, de, ja; default: the visitor's browser), `submitLabel`, and `autoHeight` to grow the iframe with the document. Callbacks: `onReady`, `onDocumentLoaded({ title, pageCount, fieldCount })`, `onSubmit(submission)`, `onClose` and `onError({ code, message })`, for example `quota_exhausted`.

Webhook: add an endpoint for `embed.document_submitted` in Settings → Embedded editor. The body carries the field values (signature and photo values are null and listed in `omittedFields`, because they are in the PDF) and `file.url`, a link to the flattened PDF valid for 24 hours. Each delivery has a `PDFBetter-Signature: t=…,v1=…` header: an HMAC-SHA256 of `t.rawBody` with your endpoint's signing secret. Recompute it over the raw body, compare in constant time and reject old timestamps.

The same account works with the REST API and the MCP server, so a submission can start a workflow, a signature request or an extraction. Full reference and copyable snippets: [developers](https://pdfbetter.com/developers/).

#### Built for third-party pages

No third-party cookies. Each editor runs on a short-lived signed session token that is bound to one document and one parent website, so it keeps working in Safari and in browsers that block cross-site cookies.

Only your listed websites can frame the editor: the page sends a Content-Security-Policy frame-ancestors header with exactly the session's website, and every postMessage is checked against that origin in both directions and sent to it by name, never to any page.

Links to PDFs are downloaded by our servers with the same protections as our public API (https only, public addresses only, every redirect re-checked, size limits), so a link can't be used to reach private networks.

Two modes. The publishable key is the fastest start: it opens the documents you list in settings by id, with per-key daily rate limits that keep abuse out. For strict control, your server creates each session with a secret API key and fixes the document, so each visitor sees exactly the PDF you chose.

Table: Embeddable PDF editors compared (checked 2026-11-09; prices in USD)

|  | PDFBetter Enterprise | SimplePDF | Apryse WebViewer | Nutrient Web SDK |
| --- | --- | --- | --- | --- |
| Setup | One script tag or iframe, hosted by PDFBetter | Hosted by SimplePDF | SDK you integrate and host | SDK you integrate and host |
| Price with API and MCP access | $399 a month, or $299 a month billed yearly: unlimited users, 20,000 documents a month on up to 25 websites | Premium plan (250 seats): $899 a month, or $749 a month billed yearly | Quote from sales | Quote from sales, annual license |
| Signing and forms | Fill, sign, text, check marks and dates in the embed, plus signature requests with sealed PDFs in the same account | Simple Electronic Signatures (SES) on every plan; audit logs on Premium | Digital Signatures is an add-on; form building comes with the Digital Signing add-on | Forms and Digital Signatures are separately licensed components |
| Also in the plan | Full PDF editor, AI answers with page citations, OCR, REST API, MCP server and signed webhooks | Webhooks from Basic; AI agent tools from Pro; API access and MCP server on Premium | PDF Editing, Smart Data Extraction and Conversion are add-ons | Redaction, Document Comparison and Document Editor are separately licensed components |
| Your branding | Your logo and brand color, included | Custom branding on Pro and Premium | Built into your own app | Built into your own app; trial PDFs carry a Nutrient watermark |
| Source | [Pricing](https://pdfbetter.com/pricing/) | simplepdf.com/pricing | apryse.com/pricing | nutrient.io/sdk/pricing |

#### Your brand, your data flow

Turn on branding and the editor shows your team's logo and brand color, included in the plan.

Each document opened in an embed counts as one session. [Enterprise](https://pdfbetter.com/pricing/) ($399 a month, or $299 a month billed yearly, one price for the whole team with unlimited users) includes 20,000 sessions a month on up to 25 websites, alongside everything in Business: the full editor, signature requests, AI answers with page citations, OCR, the REST API and webhooks.

PDFBetter Enterprise puts the hosted editor, unlimited users, the REST API, the MCP server and webhooks behind one published price. SimplePDF keeps API access and its MCP server for its Premium plan, at $899 a month or $749 billed yearly (simplepdf.com/pricing, checked 2026-11-09). Apryse and Nutrient sell PDF SDKs that you integrate and host yourself, priced by quote, with digital signatures sold as an add-on or a separately licensed component (apryse.com/pricing and nutrient.io/sdk/pricing, checked 2026-11-09).

#### FAQ

**Do my visitors need a PDFBetter account?**

No. They fill and sign anonymously inside your page. The document belongs to your account: it is stored in an embed area under your account, not in a visitor account.

**Is the publishable key safe to put in my HTML?**

Yes. It can only start editor sessions, and only for a page on one of your allowed websites (checked from the browser's Origin header, and enforced again by frame-ancestors when the editor loads). Revoke or rotate it in settings at any time; revoking stops new sessions immediately.

**What do I get when someone presses Submit?**

The field values (field name → value) and a download link for the flattened PDF, valid for one hour, in the onSubmit callback. A webhook endpoint subscribed to embed.document_submitted receives the same values and a 24-hour link, signed with your webhook secret. Signature and photo values are left out of the webhook payload because they are in the PDF.

**Which PDFs can it open?**

A public https link (downloaded by our servers), a file your page passes to the editor, blank pages, or one of your PDFBetter documents or templates: by id when you've listed it under “Documents this embed may open”, or any of your documents when your server creates the session with an API key. Fillable PDFs keep their fields; any PDF can be signed and annotated.

**How are embed sessions counted?**

Each document opened in an embed is one session, and Enterprise includes 20,000 a month. Your page gets an error event with the code quota_exhausted and your account gets a notice if a month's sessions are all used; the count starts fresh with each usage period.

**How do I verify the webhook came from PDFBetter?**

Read the PDFBetter-Signature header (t=timestamp,v1=signature), compute HMAC-SHA256 over the timestamp, a dot and the raw request body with your endpoint's signing secret, compare in constant time and reject timestamps more than five minutes old.

**Which plan includes the embedded editor?**

It's part of Enterprise, sold on pdfbetter.com: $399 a month, or $299 a month billed yearly, one price for the whole team with unlimited users. Enterprise also includes everything in Business, from signature requests and AI answers with page citations to the REST API and webhooks.

**Can I change the button text and the language?**

Yes. Set submitLabel for the button and locale for English, Spanish, French, German or Japanese. Without a locale the editor follows the visitor's browser language.
