How to Create a PDF from HTML in Zapier
Convert HTML to PDF in a Zap by mapping your content into PDF.co, checking the result, then saving or sending the temporary output URL.
To create a PDF from HTML in Zapier, start with a trigger that provides HTML or a web URL, add PDF.co’s HTML to PDF Converter action, map the input, configure the page options, and test the result. If the PDF must remain available after the Zap runs, add a separate step to save or deliver it: PDF.co says its returned output URL is temporary. [PDF.co’s Zapier integration] [PDF.co’s tutorial]
1. Prepare the content and choose a trigger
Pick the Zap trigger that produces the data you want in the PDF. Common shapes include HTML text from a form or another app, a URL to a page, or an HTML file. Your trigger needs to expose that value as a field Zapier can map into the conversion step.
- HTML text: Use when an earlier step creates or returns markup.
- URL: Use when the converter should render a web page.
- HTML file: Consider PDF4me’s documented Convert HTML to PDF action if your workflow passes an HTML file; map the file and test the rendered PDF. [PDF4me’s Zapier integration guide]
For an HTML file, make sure the upstream step provides a file value that the chosen Zapier action accepts, rather than merely a filename or a text description. Follow the selected app’s field instructions and verify the mapped value in a test run.
2. Connect PDF.co and add the converter action
- In the Zap editor, add a step after your trigger and choose PDF.co.
- Select HTML to PDF Converter.
- Connect your PDF.co account. PDF.co’s Zapier help says setup requires an active account, an API key, and sufficient credits. [PDF.co’s integration help]
- Choose the input type supported by the action and map the trigger’s HTML or URL field.
Zapier documents HTML or URL input for this action, along with optional page and rendering settings. It also lists Handlebars and Mustache template support. Use those templates only when your incoming content and intended substitutions fit the action’s template fields; test the generated document for the expected values. [Zapier’s PDF.co integration listing]
3. Configure page size and rendering
Set the options that affect the output your readers will receive. The available fields depend on the action configuration shown in Zapier. Documented options include orientation, page size, custom margins, background rendering, media type, and filename. [Zapier’s PDF.co integration listing]
| Option | When to adjust it | What to inspect |
|---|---|---|
| Orientation | Use portrait for ordinary documents; consider landscape for genuinely wide tables or reports. | Check that columns fit and text remains readable. |
| Page size | Choose the page dimensions expected by the recipient or downstream process. | Look for clipped content and unexpected page breaks. |
| Margins | Set custom margins when content needs more or less printable area. | Check headers, footers, and content near the page edges. |
| Background rendering | Enable it when the page’s background colors or design are part of the document. | Confirm the output includes the intended background. |
| Media type | Set the rendering mode appropriate to the styles your HTML uses, if exposed by the action. | Compare the PDF to the intended screen or print layout. |
| Filename | Set a useful name when later steps store or send the result. | Check that the stored attachment has the expected name. |
Do not assume the PDF will match a browser view without checking. Test with representative content, including the longest likely text, tables, images, and any template substitutions. PDF.co’s own tutorial recommends checking details such as page breaks, file size, orientation, margins, and filename. [PDF.co’s tutorial]
4. Test, inspect, and persist the PDF
- Run the Zapier test for the converter step with a realistic trigger record.
- Open the resulting PDF and inspect content completeness, page breaks, size, orientation, margins, and filename.
- If anything is wrong, adjust the input mapping or page settings, then test again.
- Add a following action to save or send the PDF when you need durable access. PDF.co gives Google Drive, Dropbox, Airtable, and email as examples of downstream storage or delivery. [PDF.co’s tutorial]
- Test the complete Zap, including whether the downstream action receives the actual file or a usable output value.
The storage step matters because PDF.co describes the output URL as temporary. Treat that URL as an intermediate handoff, not as your long-term archive. [PDF.co’s tutorial]
5. Alternative for workflows with an HTML file: PDF4me
PDF4me documents a Zapier Convert HTML to PDF action. Its guide describes mapping an HTML file, choosing portrait or landscape, and receiving a PDF file URL for later Zap steps. It also describes CSS support and HTML files that may include embedded CSS and media. This can suit a workflow whose source is already an HTML file; confirm the action accepts your exact file value and compare its rendering with a representative document before depending on it. The available research does not establish comparative pricing, quotas, or service limits, so check each provider’s current account requirements directly. [PDF4me’s Zapier integration guide]
6. Troubleshooting
| Symptom | Likely cause | What to do |
|---|---|---|
| PDF.co will not connect | The account is inactive, the API key is missing or incorrect, or the account lacks sufficient credits. | Confirm the PDF.co account, reconnect with the correct API key, and check credits. [PDF.co integration help] |
| Converter receives blank or wrong content | The Zap maps the wrong trigger field, or maps a filename/description instead of the HTML, URL, or file value. | Inspect the test input and remap the field that contains the actual content. |
| Output is missing background styling | Background rendering may be off or the selected media type may not match the styles. | Review those available options and rerun a test with the same source. |
| Content is clipped or split badly | Page size, orientation, margins, or source layout do not fit the chosen page. | Adjust the page settings and inspect a document with the widest and longest expected content. |
| PDF differs from the source page | The rendering settings, CSS, embedded media, or dynamic source content may produce a different result in conversion. | Test the actual input and options; simplify or correct the source markup where possible, then inspect again. |
| Link no longer works later | The returned PDF.co output URL is temporary. | Add a downstream storage or delivery action and retain the saved file instead. [PDF.co’s tutorial] |
| PDF4me step cannot use the incoming value | The source may not be an HTML file in the form expected by that action. | Check the mapped file field and test a valid HTML file with embedded styles or media as needed. [PDF4me guide] |
7. Reliability, runtime, and cost considerations
- Reliability: Test the entire Zap with realistic and edge-case documents before using it for important invoices, reports, or certificates. Check both the rendered PDF and the save/send step.
- Rendering: Layout differences and page breaks are document-specific. Keep representative test input that exercises long text, wide tables, background styling, and media you use.
- Retention: Save the PDF in a durable destination if it must be available after the conversion URL expires or becomes unavailable.
- Cost: PDF.co’s integration requires sufficient credits. The research does not establish current prices, credit consumption, or Zapier task costs. Check the current vendor and Zapier account details before estimating workflow cost; do not assume one conversion equals a particular number of credits.
- Performance: The cited documentation does not provide a conversion-time benchmark or service limit. Avoid promising a completion time. If later steps depend on the output, test the end-to-end handoff and ensure they receive the file before trying to store or send it.
8. ScreenshotNeo for web-page captures
If your goal is a screenshot of a web page rather than a paginated PDF document created from HTML, ScreenshotNeo is a website screenshot API and MCP server for developers. It returns a screenshot as PNG, JPEG, or WebP, or a PDF, from one GET request. It is not a replacement for testing a document-conversion workflow when you need controlled multipage document output.
Or skip the browser setup
For a PDF capture of a web page, call ScreenshotNeo directly. See the API documentation for parameters and configuration. This example writes the response to a PDF file:
curl -G "https://api.screenshotneo.com/v1/shot" \
-d access_key=YOUR_API_KEY \
--data-urlencode url=https://stripe.com \
-d format=pdf \
-o page.pdf
import requests
r = requests.get(
"https://api.screenshotneo.com/v1/shot",
params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com", "format": "pdf"},
timeout=90,
)
r.raise_for_status()
open("page.pdf", "wb").write(r.content)
const q = new URLSearchParams({
access_key: 'YOUR_API_KEY',
url: 'https://stripe.com',
format: 'pdf'
});
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`ScreenshotNeo returned ${res.status}`);
await import('node:fs/promises').then(fs => fs.writeFile('page.pdf', Buffer.from(await res.arrayBuffer())));
- Cookie banners are accepted like a visitor and removed before capture; ScreenshotNeo also removes 60+ known consent platforms, newsletter popups, and chat widgets, and each cleanup step can be turned off.
- Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing; response headers identify the page verdict and billing status.
- An MCP server lets AI agents use the
take_screenshot,get_page_info, andcapture_pdftools. - 1,000 screenshots per month are free with no card; paid plans start at $5 for 3,000. Every feature is on every plan.
Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.
9. Frequently asked questions
Can a Zap turn a URL into a PDF without first creating an HTML file?
Yes. PDF.co’s Zapier action documents URL input as an option; map the URL field and test the rendered result. [Zapier’s PDF.co listing]
Can I use Handlebars or Mustache?
Zapier’s PDF.co integration listing documents support for both template styles. Verify the mapped template data and inspect substituted values in a test PDF. [Zapier’s PDF.co listing]
Which action should I use when I have an HTML file?
PDF.co accepts HTML or URL input according to the Zapier listing, while PDF4me documents an HTML-file workflow. Choose based on the actual input value your trigger provides and test the output. [Zapier’s PDF.co listing] [PDF4me’s guide]
Does the conversion step keep my PDF permanently?
Do not rely on the PDF.co output URL as permanent; the tutorial says it is temporary. Add a storage or delivery action for retention. [PDF.co’s tutorial]


