PodPDF
v1.2.0Turn HTML, Markdown, URLs and saved templates into PDFs with the PodPDF API.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
generate_pdf Generate PDF
Convert HTML, Markdown or a public HTTPS URL to a PDF (up to 25 pages, 30 seconds). Returns a download link valid for 1 hour. Costs one PodPDF credit. Docs: https://apidocs.podpdf.com/api-reference/quickjob
| Parameter | Type | Description |
|---|---|---|
content * | string | The HTML, the Markdown, or the https:// URL to convert |
input_type * | string | What `content` is |
format | string | Paper size (default A4) |
landscape | boolean | Landscape orientation |
lang | string | With pdf_standard: the document language, e.g. "en-GB". Defaults to <html lang>, then "en" |
margin | string | Margin for all four sides, e.g. "20mm" or "0.5in" |
pageRanges | string | Pages to keep, e.g. "1-3, 5" |
pdf_standard | string | Alpha. Make an accessible, tagged PDF: "pdf/ua-1" (PDF/UA-1, PDF 1.7) or "pdf/ua-2" (PDF/UA-2, PDF 2.0). HTML and Markdown only. The result includes veraPDF's conformance verdict. Leave it out for an… |
printBackground | boolean | Print background colours and images (default true) |
save_path | string | Optional local file path to save the PDF to, e.g. "./invoice.pdf". The download link is returned either way. |
scale | number | Render scale, 0.1 to 2 (default 1) |
title | string | With pdf_standard: the title PDF readers show. Defaults to the page's <title>, then its first heading |
render_template Render Template
Fill a saved PodPDF template with data and render it to PDF. Template IDs are shown in the dashboard (Templates → Use via API). Docs: https://apidocs.podpdf.com/api-reference/templates
| Parameter | Type | Description |
|---|---|---|
data * | object | Values for the template's fields; nested objects and arrays of objects for list fields. A dotted key such as "customer.name" is also accepted. |
template_id * | string | Template ID from the PodPDF dashboard |
filename | string | File name for the PDF |
lang | string | With pdf_standard: the document language, e.g. "en-GB". Defaults to <html lang>, then "en" |
pdf_standard | string | Alpha. Make an accessible, tagged PDF: "pdf/ua-1" (PDF/UA-1, PDF 1.7) or "pdf/ua-2" (PDF/UA-2, PDF 2.0). HTML and Markdown only. The result includes veraPDF's conformance verdict. Leave it out for an… |
save_path | string | Optional local file path to save the PDF to, e.g. "./invoice.pdf". The download link is returned either way. |
title | string | With pdf_standard: the title PDF readers show. Defaults to the page's <title>, then its first heading |
start_long_job Start Long Job
Queue a large HTML or Markdown document (up to 100 pages) for asynchronous rendering. Returns a job_id; set wait to true to poll until it finishes and return the download link. Docs: https://apidocs.podpdf.com/api-reference/longjob
| Parameter | Type | Description |
|---|---|---|
content * | string | The HTML or Markdown to render |
input_type * | string | What `content` is |
format | string | Paper size (default A4) |
landscape | boolean | Landscape orientation |
lang | string | With pdf_standard: the document language, e.g. "en-GB". Defaults to <html lang>, then "en" |
margin | string | Margin for all four sides, e.g. "20mm" or "0.5in" |
pageRanges | string | Pages to keep, e.g. "1-3, 5" |
pdf_standard | string | Alpha. Make an accessible, tagged PDF: "pdf/ua-1" (PDF/UA-1, PDF 1.7) or "pdf/ua-2" (PDF/UA-2, PDF 2.0). HTML and Markdown only. The result includes veraPDF's conformance verdict. Leave it out for an… |
printBackground | boolean | Print background colours and images (default true) |
scale | number | Render scale, 0.1 to 2 (default 1) |
title | string | With pdf_standard: the title PDF readers show. Defaults to the page's <title>, then its first heading |
wait | boolean | Wait up to 3 minutes for the job to finish (default false) |
get_job Get Job
Get the status and details of a PodPDF job (queued, processing, completed, partial_failed, failed, timeout). Docs: https://apidocs.podpdf.com/api-reference/jobs
| Parameter | Type | Description |
|---|---|---|
job_id * | string | Job ID |
get_download_link Get Download Link
Get a fresh 1-hour download link for a finished job's stored output (long, bulk, merge/split, or stored quick and template jobs). Docs: https://apidocs.podpdf.com/api-reference/jobs
| Parameter | Type | Description |
|---|---|---|
job_id * | string | Job ID |
save_path | string | Optional local file path to save the PDF to, e.g. "./invoice.pdf". The download link is returned either way. |
merge_pdfs Merge PDFs
Merge 2 to 20 PDFs into one, in the order given, optionally taking only some pages of each. Costs one PodPDF credit. Docs: https://apidocs.podpdf.com/api-reference/pdf-tools
| Parameter | Type | Description |
|---|---|---|
files * | array | The PDFs to merge, in order |
filename | string | Name for the merged PDF, e.g. "deal-pack.pdf" |
pages | array | Optional page range per file, in the same order, e.g. ["", "2-end"]. Blank means every page. |
save_path | string | Optional local file path to save the PDF to, e.g. "./invoice.pdf". The download link is returned either way. |
split_pdf Split PDF
Split one PDF into several: each page, every N pages, by page ranges, or just the pages you pick. Costs one PodPDF credit. Docs: https://apidocs.podpdf.com/api-reference/pdf-tools
| Parameter | Type | Description |
|---|---|---|
file * | string | A PDF: a path on this machine, e.g. "./contract.pdf", or an https:// link to one |
mode * | string | each_page: one PDF per page. every_n: a new file every N pages. ranges: one file per range. extract: one file with the pages you name. |
every_n | integer | For every_n: how many pages per file |
filename_pattern | string | How to name the parts; {basename}, {index}, {index:03} and {pages} are filled in |
pages | string | For extract: e.g. "1-3,5" |
ranges | array | For ranges: e.g. ["1-3", "4-9", "10-end"] |
save_dir | string | Optional local directory to save every part into |
inspect_pdf Inspect PDF
Look at a PDF without changing it: page count, page ids and sizes, encryption, and (with for_edit) every form field with its type, value and options. Free, and the right first step before edit_pdf. Docs: https://apidocs.podpdf.com/api-reference/pdf-editor
| Parameter | Type | Description |
|---|---|---|
file * | string | A PDF: a path on this machine, e.g. "./contract.pdf", or an https:// link to one |
for_edit | boolean | true also returns page ids for recipes and the form field survey (needs the editor on your plan) |
edit_pdf Edit PDF
Apply a recipe of operations to a PDF in one call, charged once however many it carries: text.add, watermark.text, watermark.image, header_footer, bates.stamp, pages.rotate/delete/extract/reorder/insert, metadata.set/strip, sanitize, form.fill, form.flatten, annotate.highlight/note/stamp, annotations.flatten. Call inspect_pdf with for_edit first for page ids and form fields. Docs: https://apidocs.podpdf.com/api-reference/pdf-editor
| Parameter | Type | Description |
|---|---|---|
file * | string | A PDF: a path on this machine, e.g. "./contract.pdf", or an https:// link to one |
recipe * | array | Operations applied in order, e.g. [{"op":"watermark.text","text":"DRAFT","rotation":45},{"op":"metadata.strip"}]. For `pages`, use page ids from inspect_pdf as a list (["p0","p2"]) or page numbers as… |
filename | string | Name for the edited PDF |
save_path | string | Optional local file path to save the PDF to, e.g. "./invoice.pdf". The download link is returned either way. |
protect_pdf Protect PDF
Password-protect a copy of a PDF (AES-256): a password to open it, and/or an owner password with restrictions on printing, copying or editing. Costs one PodPDF credit. The password passes through this conversation to PodPDF, which uses it to write the file and never stores or logs it. Asking twice is charged twice. Docs: https://apidocs.podpdf.com/api-reference/pdf-tools
| Parameter | Type | Description |
|---|---|---|
file * | string | A PDF: a path on this machine, e.g. "./contract.pdf", or an https:// link to one |
filename | string | Name for the protected PDF; defaults to the original name with -protected |
owner_password | string | Needed to change or remove the protection. Required when anything in permissions is restricted; must differ from user_password. |
permissions | object | What readers may do. Everything is allowed unless restricted here. Screen readers can always read the text. |
save_path | string | Optional local file path to save the PDF to, e.g. "./invoice.pdf". The download link is returned either way. |
user_password | string | Needed to open the PDF. Up to 127 bytes. PodPDF cannot recover it. |
unlock_pdf Unlock PDF
Remove the password and restrictions from a copy of a protected PDF, so it can be merged, split or edited. Needs the right password: the open password or the owner password, and only the owner password for a PDF that opens freely but restricts printing or copying. A wrong password is not charged; otherwise one PodPDF credit. The password passes through this conversation to PodPDF, which uses it to write the file and never stores or logs it. Asking twice is charged twice. Docs: https://apidocs.podpdf.com/api-reference/pdf-tools
| Parameter | Type | Description |
|---|---|---|
file * | string | A PDF: a path on this machine, e.g. "./contract.pdf", or an https:// link to one |
password * | string | The PDF's open password or owner password |
filename | string | Name for the unlocked PDF; defaults to the original name with -unlocked |
save_path | string | Optional local file path to save the PDF to, e.g. "./invoice.pdf". The download link is returned either way. |