Embedding a Document Preview
Last updated March 23, 2026
Every document returned by the API includes a preview_url field. This URL loads a lightweight viewer that you can embed in an <iframe> to display the document without leaving your application.
When it’s available
The preview_url is populated as soon as the document is created – even when the status is draft. Unlike download_url, you don’t need to wait for generation to complete.
Embedding the preview
Drop the URL into an iframe:
<iframe src="DOCUMENT_PREVIEW_URL" width="100%" height="600"></iframe>
What the viewer looks like
The preview opens in a minimal viewer that simply renders the PDF. There are no toolbars, no controls, and no PDFMonkey branding – your users see the document and nothing else.
Use cases
- Draft approval – let stakeholders review a document before you finalize it
- In-app viewer – show receipts, certificates, or invoices directly inside your product
- Pre-download preview – display the PDF alongside a download button
- Internal support – give your team a quick way to inspect a customer’s document
Important notes
preview_urlis not a download URL. To retrieve the generated file, usedownload_url.- Each time a document is saved, an internal checksum updates and the
preview_urlchanges accordingly, so browsers and iframes always load the latest version without caching issues. - Templates also expose a
preview_url– see the API reference for details.
Comparison with other URL fields
| Field | Available when | Purpose | Expires |
|---|---|---|---|
preview_url | Always (including draft) | Embeddable PDF viewer | No |
download_url | success only | Temporary signed download link | After 1 hour |
public_share_link | success (Pro+ and Premium) | Permanent public URL | No |
See also: The Download URL – Share Links
Frequently asked questions
- How do I embed a PDFMonkey document preview in my app?
- Use the preview_url field from the API response and place it in an iframe: <iframe src="DOCUMENT_PREVIEW_URL"></iframe>. The viewer renders the PDF with no toolbars, controls, or branding.
- When is the preview_url available for a PDFMonkey document?
- The preview_url is populated as soon as the document is created, even when the status is still draft. Unlike download_url, you don’t need to wait for generation to complete.
- What is the difference between preview_url and download_url in PDFMonkey?
- preview_url is an embeddable PDF viewer available at any status and does not expire. download_url is a temporary signed download link available only after successful generation and valid for 1 hour.