How options are checked
These 49 tools are the same ones the website tools and the Documents dashboard run, with the same options. Every request is checked against this reference before any work starts or anything is charged. An unknown option, a value outside its choices or range, a missing option that the selected mode requires, a missing required asset or the wrong number of inputs returns 400 OPERATION_INPUT_INVALID. An input or asset of a type or size the tool does not accept returns 422 OPERATION_INPUT_UNSUPPORTED.
A number sent for a text choice ("angle": 90) is read as that choice, and the text "true" is read as a boolean. Options marked secret are stored encrypted and returned as [redacted].
File size: your plan's upload limit applies to every input. Free 100 MB; Developer D1 and D2 100 MB; Developer D3 200 MB per file (1 MB = 1,048,576 bytes). Files above 50 MB use the chunked upload (POST /api/v2/uploads).
The SDKs type the same options: ToolParameters and TOOLS in TypeScript, TOOL_PARAMETERS and TOOLS in Python, wellfriend.Tools in Go. The MCP tool tools_catalog lists them too.
{
"documentId": "doc_first",
"toolId": "merge-pdf",
"inputs": [
{
"documentId": "doc_second"
},
{
"documentId": "doc_third",
"versionId": "ver_third"
}
],
"idempotencyKey": "merge-2026-11-06-1"
}{
"documentId": "doc_contract",
"toolId": "sign-pdf",
"parameters": {
"signatureType": "digital",
"certificatePassphrase": "••••",
"page": 1,
"position": "bottom-right"
},
"assets": {
"certificateFile": {
"content": "<base64 of the .p12 file>",
"fileName": "signer.p12"
}
},
"idempotencyKey": "sign-2026-11-06-1"
}{
"documentId": "doc_report",
"toolId": "add-watermark",
"parameters": {
"type": "image",
"opacity": 0.3,
"position": "middle-center"
},
"assets": {
"watermarkImage": {
"documentId": "doc_logo"
}
},
"idempotencyKey": "wm-2026-11-06-1"
}Add Page Numbers (add-page-numbers)
Insert numbered headers or footers.
Inputs: 1 of application/pdf. Output: PDF document (application/pdf).
Fonts: see /docs/fonts.
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=add-page-numbers
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| position | enum | top-left, top-center, top-right, middle-left, middle-center, middle-right, bottom-left, bottom-center, bottom-right, diagonal | middle-center | Number placement. | |
| positionMode | enum | preset, custom | preset | Use a placement preset or percentage coordinates. | |
| xPercent | number | 0 to 100 | 50 | positionMode = custom | Horizontal center for custom placement. |
| yPercent | number | 0 to 100 | 50 | positionMode = custom | Vertical center for custom placement. |
| scale | number | 0.1 to 4 | 1 | Size multiplier applied to fontSize. | |
| format | enum | number, page-number, number-of-total, dashes, custom | number | Page-number text format. | |
| template (required when used) | string | text | format = custom | Custom template using {n} and {total}. Required in custom format. | |
| prefix | string | text | Text before the generated page number, up to 40 characters. | ||
| suffix | string | text | Text after the generated page number, up to 40 characters. | ||
| pageMode | enum | single, facing | single | Single placement or mirrored facing-page placement. | |
| facingPlacement | enum | outside, inside | outside | pageMode = facing | Place facing-page numbers inside or outside. |
| startNumber | number | 1 to 1000000 | 1 | Number assigned to the first selected PDF page. | |
| fontSize | number | 8 to 180 | 60 | Number font size in points, before scale is applied. | |
| fontFamily | string | text | helvetica | Number font: helvetica, times or courier (standard PDF fonts); gf:<id> embeds a family of the font catalog (/docs/fonts: every Google Fonts family, all scripts, shaped for Devanagari, Bengali, Tamil, Telugu and Arabic); u:<id> one of your uploaded fonts (the id from your fonts in the Document editor; another person's or a deleted font is refused). | |
| fontStyle | enum | regular, bold, italic, bold-italic | regular | Font style. | |
| xOffset | number | text | 0 | Fine horizontal offset in PDF points. Positive moves right. | |
| yOffset | number | text | 0 | Fine vertical offset in PDF points. Positive moves down. | |
| margin | number | 0 to 240 | 36 | Page-edge margin in PDF points for preset placement. | |
| rotation | number | -360 to 360 degrees | Turn of the number in degrees, counter-clockwise, from -360 to 360 (decimals allowed; 0 and 360 are upright). The number sits at its spot, and stays whole on the page, by the box it covers once turned. When omitted it is 45 for the diagonal position, otherwise 0. | ||
| color | string | text | #2e2e2e | Number color as a six-digit hex value. | |
| pages | string | text | Pages to number; blank numbers every page. Page numbers and ranges separated by commas, plus odd, even, last and last-N (the Nth page before the last), e.g. 1-3,5, odd or 5-last. | ||
| outputName | string | text | Output file name without a path; the extension is added for you. |
Add Watermark (add-watermark)
Stamp text or image onto pages.
Inputs: 1 of application/pdf. Output: PDF document (application/pdf).
Fonts: see /docs/fonts.
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=add-watermark
Asset file watermarkImage (a stored document version {documentId, versionId}; .avif .jpeg .jpg .png .tif .tiff .webp; up to 20 MiB): required when type = image.
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| type | enum | text, image | text | Text or image watermark. | |
| text (required when used) | string | text | type = text | Watermark text, up to 120 characters. Required in text mode. | |
| opacity | number | 1 to 100 % | 35 | Opacity from 1 to 100 percent. | |
| layer | enum | over, below | over | Draw over or below page content. | |
| pattern | enum | single, tile | single | Single or tiled watermark. | |
| tileSpacing | number | 60 to 600 | 180 | pattern = tile | Tile spacing in PDF points. |
| rotation | number | -360 to 360 degrees | 45 | Rotation in degrees, counter-clockwise. | |
| position | enum | top-left, top-center, top-right, middle-left, middle-center, middle-right, bottom-left, bottom-center, bottom-right | middle-center | Preset placement, one of nine spots. A custom spot uses positionMode=custom with xPercent and yPercent. | |
| positionMode | enum | preset, custom | preset | Use a placement preset or percentage coordinates. | |
| xPercent | number | 0 to 100 | 50 | positionMode = custom | Horizontal centre of the watermark as a percentage of the page width; the watermark is kept inside the page. |
| yPercent | number | 0 to 100 | 50 | positionMode = custom | Vertical centre of the watermark as a percentage of the page height, from the top; the watermark is kept inside the page. |
| scale | number | 5 to 100 % | 34 | type = image | Width of an image watermark as a percentage of the page width. |
| fontSize | number | 8 to 180 | 60 | type = text | Text watermark font size in points. |
| fontFamily | string | text | helvetica | type = text | Text-watermark font: helvetica, times or courier (standard PDF fonts); gf:<id> embeds a family of the font catalog (/docs/fonts: every Google Fonts family, all scripts, shaped for Devanagari, Bengali, Tamil, Telugu and Arabic); u:<id> one of your uploaded fonts (the id from your fonts in the Document editor; another person's or a deleted font is refused). |
| fontStyle | enum | regular, bold, italic, bold-italic | regular | type = text | Text-watermark font style. |
| xOffset | number | -240 to 240 | 0 | Fine horizontal offset in PDF points. Positive moves right. | |
| yOffset | number | -240 to 240 | 0 | Fine vertical offset in PDF points. Positive moves down. | |
| color | string | text | #2e2e2e | type = text | Text color as a six-digit hex value. |
| pages | string | text | Pages to watermark; blank applies to every page. Page numbers and ranges separated by commas, plus odd, even, last and last-N (the Nth page before the last), e.g. 1-3,5, odd or 5-last. | ||
| outputName | string | text | Output file name without a path; the extension is added for you. |
Check PDF (check-pdf)
One report on PDF/A conformance, PDF/UA accessibility and digital signatures.
Inputs: 1 of application/pdf. Output: JSON report (application/json): PDF/A conformance, PDF/UA accessibility and digital signatures, each with a pass, warn or fail summary and its details.
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=check-pdf
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| checkPdfa | boolean | true, false | true | Check PDF/A archival conformance. | |
| targetProfile | enum | pdfa-1b, pdfa-2b, pdfa-2u, pdfa-3b, pdfa-3u | pdfa-2b | checkPdfa = true | PDF/A profile to check against. |
| checkPdfua | boolean | true, false | true | Check the PDF/UA accessibility rules a machine can test. | |
| checkSignatures | boolean | true, false | true | Validate every digital signature: integrity, certificate and trust. | |
| outputName | string | text | Output file name without a path; the extension is added for you. |
Compress (compress-pdf)
Make PDFs and images smaller without changing how they look.
Inputs: 1 of application/pdf, image/jpeg, image/png, image/webp, image/gif, image/tiff, image/bmp, image/avif. Output: The PDF, compressed (application/pdf); an image comes back in its own format (JPEG, PNG, WebP, GIF, TIFF, BMP or AVIF) at the same pixel size, never larger than the input.
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=compress-pdf
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| profile | enum | best, medium, aggressive_lossless, aggressive_max | best | Compression profile, for PDFs and images alike. best keeps the highest quality, medium balances size and quality, aggressive_lossless is the strongest compression that never changes how pages look (an image keeps every pixel), aggressive_max makes the smallest files. The output is never larger than the input: when nothing smaller is valid the original is returned. | |
| fastWebView | boolean | true, false | false | Optimise for fast web view (linearize): a browser shows the first page while the rest downloads. Runs after compression and never compresses again. | |
| targetSize | number | 0.01 to 2097152 | Target output size in targetUnit (1 KB = 1024 bytes). Wellfriend tries the chosen profile first and, only if needed, stronger profiles (a lossless profile stays lossless). The result reports whether the target was reached or the closest valid output was returned. | ||
| targetUnit | enum | kb, mb | mb | The unit of the target size. | |
| targetSizeTolerancePercent | number | 5 to 10 % | 7.5 | How far above the target the output may land and still count as reaching it. | |
| metadata | enum | keep, strip | keep | Images only: keep copies the image's details (EXIF, XMP, text, colour profile); strip removes them but keeps the orientation and the colour profile, so the image still looks the same. A PDF ignores it. | |
| outputName | string | text | Output file name without a path; the extension is added for you. |
Convert from JPG (convert-from-jpg)
Export JPG files to another image format.
Inputs: 1 of image/jpeg. Output: Image in targetFormat: PNG, WebP, AVIF, or TIFF.
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=convert-from-jpg
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| targetFormat | enum | png, webp, avif, tiff | png | Target image format. | |
| preset | enum | recommended, smaller, high-quality | recommended | targetFormat = webp or avif | Output quality preset for lossy target formats. |
| quality | number | 1 to 100 % | targetFormat = webp or avif | Exact encoder quality. When supplied, this overrides the preset. | |
| outputName | string | text | Output file name without a path; the extension is added for you. |
Convert to JPG (convert-to-jpg)
Convert supported images to JPG.
Inputs: 1 of image/png, image/webp, image/avif, image/tiff, image/jpeg. Output: JPG image (image/jpeg).
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=convert-to-jpg
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| preset | enum | recommended, smaller, high-quality | recommended | JPG quality preset. | |
| quality | number | 1 to 100 % | Exact JPG encoder quality. When supplied, this overrides the preset. | ||
| background | string | text | #ffffff | Background used to flatten transparent pixels, as a six-digit hex color. | |
| outputName | string | text | Output file name without a path; the extension is added for you. |
Crop Image (crop-image)
Crop an image to exact dimensions.
Inputs: 1 of image/jpeg, image/png, image/webp, image/avif, image/tiff. Output: Processed image (same family as input).
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=crop-image
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| x (required) | number | 0 to 19999 px | Left offset. | ||
| y (required) | number | 0 to 19999 px | Top offset. | ||
| width (required) | number | 1 to 20000 px | Crop width. | ||
| height (required) | number | 1 to 20000 px | Crop height. | ||
| outputFormat | enum | same, jpg, png, webp, avif, tiff | same | Keep the input format or encode a specific output format. | |
| quality | number | 1 to 100 % | 82 | Lossy encoder quality for JPG, WebP, or AVIF output (AVIF defaults to 55). | |
| background | string | text | #ffffff | Six-digit hex background used when transparent pixels are encoded as JPG. | |
| outputName | string | text | Output file name without a path; the extension is added for you. |
Crop PDF (crop-pdf)
Trim the margins of every page or the pages you pick.
Inputs: 1 of application/pdf. Output: PDF document (application/pdf).
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=crop-pdf
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| top | number | 0 to 2000 | 0 | Points to trim from the top of each page. | |
| right | number | 0 to 2000 | 0 | Points to trim from the right of each page. | |
| bottom | number | 0 to 2000 | 0 | Points to trim from the bottom of each page. | |
| left | number | 0 to 2000 | 0 | Points to trim from the left of each page. | |
| pages | string | text | Pages to crop; blank crops every page. Page numbers and ranges separated by commas, plus odd, even, last and last-N (the Nth page before the last), e.g. 1-3,5, odd or 5-last. | ||
| outputName | string | text | Output file name without a path; the extension is added for you. |
CSV to PDF (csv-to-pdf)
Convert CSV tables into a readable PDF.
Inputs: 1 of text/csv, text/plain. Output: PDF document (application/pdf).
Fonts: see /docs/fonts.
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=csv-to-pdf
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| pageSize | enum | a4, letter, a3 | a4 | Output page size. | |
| orientation | enum | portrait, landscape | portrait | Output page orientation. | |
| fontSize | number | 6 to 14 | 9 | Body font size in points. | |
| margin | number | 18 to 108 | 54 | Page margin in PDF points. | |
| fontFamily | string | text | Body font: blank keeps DejaVu Sans; helvetica, times or courier uses that standard PDF font; gf:<id> uses a family of the font catalog (/docs/fonts: every Google Fonts family, all scripts); u:<id> one of your uploaded fonts; embedded in the PDF. | ||
| delimiter | enum | comma, semicolon, tab, pipe | comma | Column delimiter of the CSV. | |
| headerRow | boolean | true, false | true | Treat the first row as a header. | |
| outputName | string | text | Output file name without a path; the extension is added for you. |
Check & Edit Metadata (edit-metadata)
Review and update document information.
Inputs: 1 of application/pdf. Output: PDF document (application/pdf), or a ZIP of PDFs in batch mode (application/zip).
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=edit-metadata
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| preset | enum | privacy-cleanup, keep-title-only, remove-author-creator-producer, clear-all, custom | Metadata cleanup preset. When omitted, only the fields you send are written. ai-suggest fills title, subject and keywords from the first pages in AI mode; values you send win. | ||
| title | string | text | PDF title metadata. An empty value clears it. | ||
| author | string | text | PDF author metadata. An empty value clears it. | ||
| subject | string | text | PDF subject metadata. An empty value clears it. | ||
| keywords | string | text | PDF keyword metadata. An empty value clears it. | ||
| creator | string | text | PDF creator metadata. An empty value clears it. | ||
| producer | string | text | PDF producer metadata. An empty value clears it. | ||
| outputName | string | text | Output file name without a path; the extension is added for you. |
Excel to PDF (excel-to-pdf)
Convert spreadsheet files to PDF.
Inputs: 1 of application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.oasis.opendocument.spreadsheet. Output: PDF document (application/pdf).
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=excel-to-pdf
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| outputName | string | text | Output file name without a path; the extension is added for you. |
Flatten PDF (flatten-pdf)
Merge form fields into static pages.
Inputs: 1 of application/pdf. Output: PDF document (application/pdf).
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=flatten-pdf
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| flattenForms | boolean | true, false | true | Bake form-field values into the page. | |
| flattenAnnotations | boolean | true, false | false | Flatten supported annotation appearances. | |
| flattenLayers | boolean | true, false | false | Flatten optional-content layers. | |
| rasterize | boolean | true, false | false | Render pages to images and rebuild a static PDF. When true, the three flatten options are skipped. | |
| dpi | number | 72 to 300 dpi | 150 | rasterize = true | Raster resolution. |
| outputName | string | text | Output file name without a path; the extension is added for you. |
Image Metadata (image-metadata)
Read an image's format, size, colour mode, frames and EXIF facts.
Inputs: 1 of image/png, image/jpeg, image/webp, image/gif. Output: JSON metadata report: format, width, height, colour mode, frames and EXIF summary (application/json).
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=image-metadata
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| outputName | string | text | Output file name without a path; the extension is added for you. |
Image to PDF (image-to-pdf)
Combine supported image files into a single PDF.
Inputs: 1 to 50 (documentId plus inputs, in order) of image/png, image/jpeg, image/webp. Output: PDF document (application/pdf).
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=image-to-pdf
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| pageSize | enum | a4, letter, match | a4 | Output page size. match sizes each page to its image. | |
| orientation | enum | auto, portrait, landscape | auto | pageSize = a4 or letter | Output page orientation. |
| margin | number | 0 to 72 | 10 | Image margin in PDF points. | |
| outputName | string | text | Output file name without a path; the extension is added for you. |
JSON to PDF (json-to-pdf)
Render structured JSON into a readable PDF.
Inputs: 1 of application/json, text/plain. Output: PDF document (application/pdf).
Fonts: see /docs/fonts.
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=json-to-pdf
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| pageSize | enum | a4, letter, a3 | a4 | Output page size. | |
| orientation | enum | portrait, landscape | portrait | Output page orientation. | |
| fontSize | number | 6 to 14 | 9 | Body font size in points. | |
| margin | number | 18 to 108 | 54 | Page margin in PDF points. | |
| fontFamily | string | text | Body font: blank keeps DejaVu Sans; helvetica, times or courier uses that standard PDF font; gf:<id> uses a family of the font catalog (/docs/fonts: every Google Fonts family, all scripts); u:<id> one of your uploaded fonts; embedded in the PDF. | ||
| outputName | string | text | Output file name without a path; the extension is added for you. |
Markdown to PDF (markdown-to-pdf)
Convert Markdown content into a PDF document.
Inputs: 1 of text/markdown, text/plain. Output: PDF document (application/pdf).
Fonts: see /docs/fonts.
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=markdown-to-pdf
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| pageSize | enum | a4, letter, a3 | a4 | Output page size. | |
| orientation | enum | portrait, landscape | portrait | Output page orientation. | |
| fontSize | number | 7 to 22 | 11 | Body font size in points. | |
| margin | number | 18 to 108 | 54 | Page margin in PDF points. | |
| fontFamily | string | text | Body font: blank keeps DejaVu Sans; helvetica, times or courier uses that standard PDF font; gf:<id> uses a family of the font catalog (/docs/fonts: every Google Fonts family, all scripts); u:<id> one of your uploaded fonts; embedded in the PDF. | ||
| outputName | string | text | Output file name without a path; the extension is added for you. |
Merge PDF (merge-pdf)
Combine multiple PDFs into one file.
Inputs: 2 to 30 (documentId plus inputs, in order) of application/pdf. Output: PDF document (application/pdf).
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=merge-pdf
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| filePages | string | text | The pages taken from each file, in merge order, separated by semicolons; blank (or nothing between two semicolons) takes every page of that file. Each entry uses page numbers and ranges, e.g. 1-3;;2,5 takes pages 1-3 of the first file, all of the second and pages 2 and 5 of the third. | ||
| fileRotations | string | text | A clockwise turn for each file, in merge order, comma-separated: 0, 90, 180 or 270, e.g. 0,90 turns every page of the second file a quarter turn. | ||
| outputName | string | text | Output file name without a path; the extension is added for you. |
N-up PDF (n-up-pdf)
Put several pages on each sheet.
Inputs: 1 of application/pdf. Output: PDF document (application/pdf).
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=n-up-pdf
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| pagesPerSheet | enum | 2, 4, 6, 8, 9, 16 | 2 | How many pages go on each sheet, in reading order. | |
| gap | number | 0 to 72 | 0 | Space between the pages and around the sheet, in points. | |
| outputName | string | text | Output file name without a path; the extension is added for you. |
OCR PDF (ocr-pdf)
Recognise the text of a scanned PDF or an image (PNG, JPEG, TIFF or WebP).
Inputs: 1 of application/pdf, image/png, image/jpeg, image/tiff, image/webp, image/gif, image/bmp, image/avif, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.openxmlformats-officedocument.presentationml.presentation, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, text/csv, text/tab-separated-values, message/rfc822, application/vnd.ms-outlook, application/zip. Output: Searchable PDF (application/pdf), or the recognised text as plain text, Markdown, JSON, DOCX, HTML, XLSX, CSV, hOCR, ALTO XML, block JSON or annotation JSON, as chosen by outputMode; further formats (outputs) are listed in the result metadata.
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=ocr-pdf
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| mode | enum | read, extract | read | read gives the full text of every page in reading order with the layout kept; extract gives fields, tables and line items as checked data (use templateId, queries or schema to say which). | |
| languages | string | text | en | Languages on the page, as comma-separated codes from the OCR language list, at most 10, such as "en,hi"; auto detects them. | |
| outputMode | enum | searchable-pdf, text, markdown, json, docx, html, xlsx, csv, hocr, alto, block-json, annotation-json | searchable-pdf | The result document: a searchable PDF with an invisible text layer, or the recognised text as plain text, Markdown, JSON, Word, HTML, Excel, CSV, hOCR, ALTO XML, block JSON or annotation JSON (every format the dashboard OCR offers). | |
| outputs | string | text | Further formats from the same result, comma-separated output formats, such as "text,xlsx". Each becomes its own derived document, listed in the operation's result metadata (outputs). | ||
| features | string | text | text,layout | What to read, comma-separated: text, layout, tables, forms (labels and their filled values), signatures. Questions (queries) add the queries feature by themselves. | |
| quality | enum | fast, standard, high | standard | Recognition quality: fast for clean prints, standard for most scans, high for difficult scans, handwriting and small print. | |
| pageRange | string | text | Optional pages to read; blank means all pages. Page numbers and ranges separated by commas, plus odd, even, last and last-N (the Nth page before the last), e.g. 1-3,5, odd or 5-last. | ||
| templateId | string | text | mode = extract | Extract with one of your saved OCR templates (an ocrtpl_ id from Dashboard, OCR, Templates; it must be ready). Use a template, queries or a schema, not more than one. | |
| queries | string | text | Questions to answer from the document, one per line, up to 30 of up to 200 characters, such as "What is the policy number?". | ||
| schema | string | text | mode = extract | Extract only: the fields to extract, as a JSON schema object (up to 64 KB). | |
| shaping | string | text | mode = extract | Extract only: the columns and number style of the Excel and CSV outputs, as a JSON object; the template's layout or the default when empty. | |
| password (secret) | string | text | The PDF's open password, for a locked PDF. Used for this job only; never stored or shown again. | ||
| saveHistory | boolean | true, false | false | Keep the OCR results for 30 days and list the job in your OCR history (otherwise they are deleted after 1 hour). | |
| webhookUrl | string | text | An OCR webhook endpoint registered on your account (Dashboard, OCR, Webhooks), told when the OCR job ends. | ||
| priority | enum | standard, batch | standard | batch costs half the credits and can take up to 45 minutes; jobs over 200 pages always run as batch. | |
| outputName | string | text | Output file name without a path; the extension is added for you. |
Organize PDF (organize-pdf)
Reorder pages and remove the ones you leave out.
Inputs: 1 of application/pdf. Output: PDF document (application/pdf).
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=organize-pdf
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| order (required) | string | text | Final one-based page sequence to keep; omitted pages are removed. Page numbers and ranges separated by commas, up to 20000 characters; a descending range reverses its pages, so 532-1 reverses a 532-page document and 1-10,20,15-12 keeps pages 1 to 10, then 20, then 15 down to 12. Each page may appear once. | ||
| rotations | string | text | Optional clockwise rotations applied after reordering, as page:angle pairs on the reordered pages (1 is the first page of the result), e.g. 1:90,3:180. Angles are 90, 180, 270 or -90. | ||
| outputName | string | text | Output file name without a path; the extension is added for you. |
PDF Table Extraction (pdf-table-extraction)
Extract table-like content from PDF text.
Inputs: 1 of application/pdf. Output: ZIP of CSV files, one per detected table (application/zip).
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=pdf-table-extraction
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| pageRange | string | text | Optional pages to read; blank means all pages. Page numbers and ranges separated by commas, plus odd, even, last and last-N (the Nth page before the last), e.g. 1-3,5, odd or 5-last. | ||
| outputName | string | text | Output file name without a path; the extension is added for you. |
PDF to Chunks (pdf-to-chunks)
Split the text of a PDF into chunks for search and AI retrieval.
Inputs: 1 of application/pdf. Output: JSON chunks (application/json): text chunks with their page ranges, for retrieval.
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=pdf-to-chunks
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| pageRange | string | text | Pages to convert; blank converts every page. Page numbers and ranges separated by commas, plus odd, even, last and last-N (the Nth page before the last), e.g. 1-3,5, odd or 5-last. | ||
| chunkSize | number | 200 to 8000 | 1500 | Target characters per chunk. | |
| overlap | number | 0 to 4000 | 150 | Characters repeated from the previous chunk (at most half the chunk size). | |
| outputName | string | text | Output file name without a path; the extension is added for you. |
PDF to EPUB (pdf-to-epub)
Create a text-based EPUB from PDF content.
Inputs: 1 of application/pdf. Output: EPUB e-book (application/epub+zip).
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=pdf-to-epub
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| pageRange | string | text | Optional pages to read; blank means all pages. Page numbers and ranges separated by commas, plus odd, even, last and last-N (the Nth page before the last), e.g. 1-3,5, odd or 5-last. | ||
| title | string | text | EPUB title. When omitted, the input file name is used. | ||
| author | string | text | Wellfriend | EPUB author. | |
| chapterSplit | enum | headings, pages | headings | Start chapters at detected headings, or every pagesPerChapter pages. | |
| pagesPerChapter | number | 1 to 500 | 10 | chapterSplit = pages | Pages per chapter in pages split. |
| includeImages | boolean | true, false | true | Include the PDF's images in the book. | |
| outputName | string | text | Output file name without a path; the extension is added for you. |
PDF to Excel (pdf-to-excel)
Export detected PDF tables into XLSX.
Inputs: 1 of application/pdf. Output: XLSX spreadsheet (application/vnd.openxmlformats-officedocument.spreadsheetml.sheet).
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=pdf-to-excel
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| pageRange | string | text | Optional pages to read; blank means all pages. Page numbers and ranges separated by commas, plus odd, even, last and last-N (the Nth page before the last), e.g. 1-3,5, odd or 5-last. | ||
| sheetLayout | enum | one, multiple | multiple | Combine tables or create separate sheets. | |
| outputName | string | text | Output file name without a path; the extension is added for you. |
PDF to HTML (pdf-to-html)
Convert the text of a PDF into a clean web page.
Inputs: 1 of application/pdf. Output: HTML document (text/html), one section per page, no scripts.
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=pdf-to-html
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| pageRange | string | text | Pages to convert; blank converts every page. Page numbers and ranges separated by commas, plus odd, even, last and last-N (the Nth page before the last), e.g. 1-3,5, odd or 5-last. | ||
| outputName | string | text | Output file name without a path; the extension is added for you. |
PDF to Images (pdf-to-images)
Export pages or embedded images from a PDF.
Inputs: 1 of application/pdf. Output: ZIP of JPG images, one per page or extracted image (application/zip).
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=pdf-to-images
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| exportMode | enum | pages, extract-images | pages | Render pages or extract embedded raster images. | |
| quality | enum | normal, recommended, high | recommended | JPG preset: normal 120 dpi, recommended 170 dpi, high 220 dpi. In extract-images mode only the JPG quality applies. | |
| pageRange | string | text | exportMode = pages | Optional pages to render; blank means all pages. Page numbers and ranges separated by commas, plus odd, even, last and last-N (the Nth page before the last), e.g. 1-3,5, odd or 5-last. | |
| imageFormat | enum | jpg, png | jpg | exportMode = pages | Image format of rendered pages: JPG (smaller) or lossless PNG. |
| dpi | number | 72 to 600 dpi | exportMode = pages | Render resolution. When set it replaces the quality preset's resolution. | |
| outputName | string | text | Output file name without a path; the extension is added for you. |
PDF to JSON (pdf-to-json)
Export PDF text as structured JSON.
Inputs: 1 of application/pdf. Output: Structured JSON (application/json).
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=pdf-to-json
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| pageRange | string | text | Optional pages to read; blank means all pages. Page numbers and ranges separated by commas, plus odd, even, last and last-N (the Nth page before the last), e.g. 1-3,5, odd or 5-last. | ||
| breakMode | enum | line, word, space | line | JSON token grouping. | |
| outputName | string | text | Output file name without a path; the extension is added for you. |
PDF to Markdown (pdf-to-markdown)
Convert extracted PDF text into Markdown.
Inputs: 1 of application/pdf. Output: Markdown (text/markdown).
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=pdf-to-markdown
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| pageRange | string | text | Optional pages to read; blank means all pages. Page numbers and ranges separated by commas, plus odd, even, last and last-N (the Nth page before the last), e.g. 1-3,5, odd or 5-last. | ||
| outputName | string | text | Output file name without a path; the extension is added for you. |
PDF to PowerPoint (pdf-to-powerpoint)
Turn every page into a slide of a PowerPoint deck.
Inputs: 1 of application/pdf. Output: PowerPoint deck (application/vnd.openxmlformats-officedocument.presentationml.presentation), one slide per page with its text as the picture description.
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=pdf-to-powerpoint
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| pageRange | string | text | Pages to convert; blank converts every page. Page numbers and ranges separated by commas, plus odd, even, last and last-N (the Nth page before the last), e.g. 1-3,5, odd or 5-last. | ||
| dpi | number | 72 to 200 | 150 | Resolution of each slide picture. | |
| outputName | string | text | Output file name without a path; the extension is added for you. |
PDF to Text (pdf-to-text)
Extract selectable or OCR text from a PDF.
Inputs: 1 of application/pdf. Output: Plain text (text/plain).
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=pdf-to-text
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| pageRange | string | text | Optional pages to read; blank means all pages. Page numbers and ranges separated by commas, plus odd, even, last and last-N (the Nth page before the last), e.g. 1-3,5, odd or 5-last. | ||
| includePageNumbers | boolean | true, false | false | Mark where each page starts in the text. | |
| readingOrder | enum | layout, raw | layout | layout recovers the reading order across columns and blocks; raw keeps the content-stream order, which is faster on simple single-column pages. | |
| outputName | string | text | Output file name without a path; the extension is added for you. |
PDF to Word (pdf-to-word)
Convert extracted PDF text into editable DOCX.
Inputs: 1 of application/pdf. Output: DOCX document (application/vnd.openxmlformats-officedocument.wordprocessingml.document).
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=pdf-to-word
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| pageRange | string | text | Optional pages to read; blank means all pages. Page numbers and ranges separated by commas, plus odd, even, last and last-N (the Nth page before the last), e.g. 1-3,5, odd or 5-last. | ||
| layout | enum | flowing, page-faithful, hybrid | flowing | flowing writes editable flowing text; page-faithful keeps each page's layout; hybrid keeps page breaks with flowing text. | |
| includeImages | boolean | true, false | true | Export the PDF's images as pictures in the document. | |
| outputName | string | text | Output file name without a path; the extension is added for you. |
PDF/A Conversion (pdfa-conversion)
Convert a PDF to PDF/A for long-term archiving.
Inputs: 1 of application/pdf. Output: PDF document (application/pdf).
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=pdfa-conversion
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| targetProfile | enum | pdfa-1b, pdfa-2b, pdfa-2u, pdfa-3b, pdfa-3u | pdfa-2b | PDF/A conformance level to convert to. The u levels also require Unicode text mapping. | |
| allowDowngrade | boolean | true, false | true | Recorded in the result metadata; it does not change the conversion. | |
| outputName | string | text | Output file name without a path; the extension is added for you. |
PowerPoint to PDF (powerpoint-to-pdf)
Convert presentation files to PDF.
Inputs: 1 of application/vnd.openxmlformats-officedocument.presentationml.presentation, application/vnd.oasis.opendocument.presentation. Output: PDF document (application/pdf).
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=powerpoint-to-pdf
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| outputName | string | text | Output file name without a path; the extension is added for you. |
Protect PDF (protect-pdf)
Lock a file with a password.
Inputs: 1 of application/pdf. Output: PDF document (application/pdf).
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=protect-pdf
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| password (required) (secret) | string | text | Password to set, up to 256 characters. | ||
| allowPrint | boolean | true, false | true | Allow printing. | |
| allowCopy | boolean | true, false | true | Allow text and image extraction. | |
| allowEdit | boolean | true, false | false | Allow document editing. | |
| allowAnnotate | boolean | true, false | false | Allow comments and annotations. | |
| ownerPassword (secret) | string | text | Separate owner (permissions) password, up to 256 characters. When omitted the owner password is the open password. | ||
| encryption | enum | aes-256, aes-128 | aes-256 | Encryption algorithm. aes-256 is read by every current PDF reader; aes-128 is the legacy PDF 1.6 algorithm for older readers. | |
| outputName | string | text | Output file name without a path; the extension is added for you. |
Redact PDF (redact-pdf)
Permanently remove text, images and areas you choose.
Inputs: 1 of application/pdf. Output: PDF document (application/pdf).
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=redact-pdf
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| regions | string | text | Areas to remove, as page:x,y,width,height in PDF points from the page's bottom-left corner (the PDF's own user space), separated by semicolons, e.g. 1:72,640,200,40;3:50,100,120,30. A turned area adds its angle as a fifth value, degrees counter-clockwise about the area's centre from -360 to 360, e.g. 1:72,640,200,40,30 (a multiple of 90 is an upright area). Everything under an area is removed: text, vector art and the covered part of images; a turned area is painted in its own shape. | ||
| searchTerms | string | text | Words or phrases to remove wherever they appear, one per line. Matching is exact and case-sensitive, as written. | ||
| patterns | string | text | Kinds of data to find and remove, comma-separated: email, phone, number (sequences of 4 or more digits, such as account or card numbers), date. Matches are found in the PDF's text and removed like search terms. | ||
| pages | string | text | Pages searched for terms and patterns; blank searches every page. Areas carry their own page. Page numbers and ranges separated by commas, plus odd, even, last and last-N (the Nth page before the last), e.g. 1-3,5, odd or 5-last. | ||
| imagePolicy | enum | partial, remove | partial | What happens to an image under an area: partial removes only the covered pixels; remove deletes every image an area touches. | |
| keepMetadata | boolean | true, false | false | Keep the document information, XMP and attachment names even when they contain a removed term. By default they are scrubbed too. | |
| outputName | string | text | Output file name without a path; the extension is added for you. |
Repair PDF (repair-pdf)
Fix corrupted or broken PDF files.
Inputs: 1 of application/pdf. Output: PDF document (application/pdf).
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=repair-pdf
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| level | enum | standard, deep | standard | Repair depth. deep rebuilds the whole object structure. | |
| outputName | string | text | Output file name without a path; the extension is added for you. |
Resize Image (resize-image)
Change image dimensions precisely.
Inputs: 1 of image/jpeg, image/png, image/webp, image/avif, image/tiff. Output: Processed image (same family as input).
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=resize-image
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| mode | enum | pixels, percentage | pixels | Resize by pixels or percentage. | |
| width | number | 1 to 20000 px | mode = pixels | Target width. Send width, height, or both. | |
| height | number | 1 to 20000 px | mode = pixels | Target height. Send width, height, or both. | |
| percentage | number | 1 to 400 % | 100 | mode = percentage | Scale percentage. |
| maintainAspect | boolean | true, false | true | mode = pixels | Preserve the source aspect ratio when only one of width or height is sent. |
| noEnlarge | boolean | true, false | true | Do not upscale images smaller than the requested size. | |
| fit | enum | inside, cover, fill | inside | How to fit the box. | |
| kernel | enum | nearest, cubic, mitchell, lanczos2, lanczos3 | lanczos3 | Pixel resampling kernel used by the image encoder. | |
| outputFormat | enum | same, jpg, png, webp, avif, tiff | same | Keep the input format or encode a specific output format. | |
| quality | number | 1 to 100 % | 82 | Lossy encoder quality for JPG, WebP, or AVIF output (AVIF defaults to 55). | |
| background | string | text | #ffffff | Six-digit hex background used when transparent pixels are encoded as JPG. | |
| outputName | string | text | Output file name without a path; the extension is added for you. |
Rotate Image (rotate-image)
Correct image orientation.
Inputs: 1 of image/jpeg, image/png, image/webp, image/avif, image/tiff. Output: Processed image (same family as input).
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=rotate-image
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| action | enum | auto, left, right, 180, flip-horizontal, flip-vertical | right | Rotation or flip preset. auto applies the EXIF orientation only; left, right and 180 rotate; flip-horizontal and flip-vertical mirror. | |
| angle | number | -360 to 360 degrees | Exact clockwise rotation. When supplied, it overrides left, right, and 180 actions. | ||
| flipHorizontal | boolean | true, false | false | Mirror left to right, before the turn, in the same run. | |
| flipVertical | boolean | true, false | false | Mirror top to bottom, before the turn, in the same run. | |
| background | string | text | #ffffff | Six-digit hex fill for corners created by a non-right-angle rotation or JPG transparency flattening. | |
| outputFormat | enum | same, jpg, png, webp, avif, tiff | same | Keep the input format or encode a specific output format. | |
| quality | number | 1 to 100 % | 82 | Lossy encoder quality for JPG, WebP, or AVIF output (AVIF defaults to 55). | |
| outputName | string | text | Output file name without a path; the extension is added for you. |
Rotate PDF (rotate-pdf)
Rotate all or specific pages.
Inputs: 1 of application/pdf. Output: PDF document (application/pdf).
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=rotate-pdf
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| angle | enum | 90, 180, 270 | 90 | Clockwise rotation in degrees. | |
| pageMode | enum | all, specific | all | Rotate all pages or a specific page set. | |
| pages (required when used) | string | text | pageMode = specific | Pages to rotate. Page numbers and ranges separated by commas, plus odd, even, last and last-N (the Nth page before the last), e.g. 1-3,5, odd or 5-last. Required in specific mode. | |
| rotations | string | text | Mixed per-page rotations as comma-separated page:angle pairs, e.g. 1:90,3:180. When set, it replaces angle, pageMode, and pages. | ||
| outputName | string | text | Output file name without a path; the extension is added for you. |
Sanitize PDF (sanitize-pdf)
Remove JavaScript, launch actions and embedded files.
Inputs: 1 of application/pdf. Output: PDF document (application/pdf).
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=sanitize-pdf
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| keepEmbeddedFiles | boolean | true, false | false | Keep embedded files and file attachments. | |
| removeMetadata | boolean | true, false | false | Also clear the document information and XMP metadata. | |
| outputName | string | text | Output file name without a path; the extension is added for you. |
Scale PDF (scale-pdf)
Resize pages and their content by a percentage.
Inputs: 1 of application/pdf. Output: PDF document (application/pdf).
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=scale-pdf
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| percent | number | 10 to 400 | 100 | New size as a percentage of the current size. | |
| pages | string | text | Pages to scale; blank scales every page. Page numbers and ranges separated by commas, plus odd, even, last and last-N (the Nth page before the last), e.g. 1-3,5, odd or 5-last. | ||
| outputName | string | text | Output file name without a path; the extension is added for you. |
Sign PDF (sign-pdf)
Add a visible signature to a PDF.
Inputs: 1 of application/pdf. Output: PDF document (application/pdf).
Fonts: see /docs/fonts.
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=sign-pdf
Asset file signatureImage (a stored document version {documentId, versionId}; .avif .jpeg .jpg .png .tif .tiff .webp; up to 20 MiB): required when signatureType = image.
Asset file stampImage (a stored document version {documentId, versionId}; .avif .jpeg .jpg .png .tif .tiff .webp; up to 20 MiB): optional.
Asset file certificateFile (sent inline as base64 {content, fileName}; .p12 .pfx; up to 2 MiB): required when signatureType = digital.
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| signatureType | enum | type, image, digital | image | Typed name, signature image, or certificate-backed digital signature. | |
| name | string | text | signatureType = type or digital | Typed signer name (required for type, up to 120 characters) or the digital appearance label. | |
| fontFamily | string | text | signatureType = type or digital | Font of the typed signature and text fields: blank keeps Helvetica Oblique; gf:<id> embeds a family of the font catalog (/docs/fonts: every Google Fonts family, all scripts, shaped for Devanagari, Bengali, Tamil, Telugu and Arabic); u:<id> one of your uploaded fonts (the id from your fonts in the Document editor; another person's or a deleted font is refused). | |
| page | number | 1 to 100000 | 1 | One-based page number for the visible signature. | |
| position | enum | top-left, top-center, top-right, middle-left, middle-center, middle-right, bottom-left, bottom-center, bottom-right, diagonal | bottom-right | Visible signature placement. | |
| positionMode | enum | preset, custom | preset | Use a placement preset or percentage coordinates. | |
| xPercent | number | 0 to 100 | 50 | positionMode = custom | Horizontal center for custom placement. |
| yPercent | number | 0 to 100 | 50 | positionMode = custom | Vertical center for custom placement. |
| rotation | number | -360 to 360 degrees | 0 | Turn of the visible signature in degrees, counter-clockwise, from -360 to 360 (decimals allowed). It sits at its spot, and stays whole on the page, by the box it covers once turned. | |
| scale | number | 0.1 to 4 | 1 | Visible signature scale multiplier. | |
| fields | array | text | Optional visible fields, up to 80: each a date, name, initials, custom-text, stamp or company-stamp box placed by its centre and size in percentages of the page. | ||
| dateFormat | enum | DD/MM/YYYY, MM/DD/YYYY, YYYY-MM-DD, D MMM YYYY | D MMM YYYY | How a date field without text prints the signing date (UTC). | |
| digitalVisible | boolean | true, false | true | signatureType = digital | Add a visible appearance to the digital signature. |
| certificatePassphrase (secret) | string | text | signatureType = digital | Passphrase for the PKCS#12 certificate. You can instead send it as a file part named certificatePassphraseFile (up to 512 bytes). | |
| outputName | string | text | Output file name without a path; the extension is added for you. |
Split PDF (split-pdf)
Separate pages into individual files.
Inputs: 1 of application/pdf. Output: One PDF (application/pdf), or a ZIP of PDFs when the split produces several parts (application/zip).
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=split-pdf
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| mode | enum | ranges, interval, each, smart, size, content, large | ranges | Split strategy. ranges: the page groups in ranges. interval: every N pages. each: one PDF per page. smart: at bookmarks, falling back to content breaks. size: parts near targetSize. content: at detected content breaks. large: fixed-size parts for very long documents. ai (and its alias ocr) finds where each document starts and names each part by its document label; it runs in AI mode and needs the AI processing agreement. | |
| ranges (required when used) | string | text | mode = ranges | Page groups, one output per comma-separated group unless mergeRanges. Page numbers and ranges separated by commas, plus odd, even, last and last-N (the Nth page before the last), e.g. 1-3,5, odd or 5-last. Required in ranges mode. | |
| mergeRanges | boolean | true, false | mode = ranges | Merge the range groups into one PDF instead of one PDF per group. When omitted it is true for a single range and false otherwise. | |
| interval | number | 1 to 5000 | 1 | mode = interval | Pages per output. |
| targetSize (required when used) | number | 1 to 10240 | mode = size | Target size of each output. Required in size mode; the smallest target is 8 KB. | |
| targetUnit | enum | kb, mb | mb | mode = size | The unit of the target size. |
| pagesPerFile | number | 1 to 250 | 50 | mode = large | Pages per output. |
| maxPages | number | 1 to 5000 | 1500 | mode = large | Safety cap on pages processed. |
| allowFallback | boolean | true, false | true | mode = smart | Fall back to content breaks when the PDF has no usable bookmarks. |
| outputName | string | text | Output file name without a path; the extension is added for you. |
SVG to PDF (svg-to-pdf)
Convert safe SVG artwork into PDF format.
Inputs: 1 of image/svg+xml, text/xml, application/xml. Output: PDF document (application/pdf).
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=svg-to-pdf
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| outputName | string | text | Output file name without a path; the extension is added for you. |
Text to PDF (text-to-pdf)
Convert plain text into a PDF document.
Inputs: 1 of text/plain. Output: PDF document (application/pdf).
Fonts: see /docs/fonts.
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=text-to-pdf
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| pageSize | enum | a4, letter, a3 | a4 | Output page size. | |
| orientation | enum | portrait, landscape | portrait | Output page orientation. | |
| fontSize | number | 7 to 22 | 11 | Body font size in points. | |
| margin | number | 18 to 108 | 54 | Page margin in PDF points. | |
| fontFamily | string | text | Body font: blank keeps DejaVu Sans; helvetica, times or courier uses that standard PDF font; gf:<id> uses a family of the font catalog (/docs/fonts: every Google Fonts family, all scripts); u:<id> one of your uploaded fonts; embedded in the PDF. | ||
| outputName | string | text | Output file name without a path; the extension is added for you. |
Unlock PDF (unlock-pdf)
Remove password from a file you own.
Inputs: 1 of application/pdf. Output: PDF document (application/pdf).
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=unlock-pdf
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| password (secret) | string | text | Current password; leave blank only for permission-restricted files. | ||
| outputName | string | text | Output file name without a path; the extension is added for you. |
Watermark Image (watermark-image)
Apply text or logo marks to an image.
Inputs: 1 of image/jpeg, image/png, image/webp, image/avif, image/tiff. Output: Processed image (same family as input).
Fonts: see /docs/fonts.
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=watermark-image
Asset file watermarkImage (a stored document version {documentId, versionId}; .avif .jpeg .jpg .png .tif .tiff .webp; up to 20 MiB): required when mode = image.
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| mode | enum | text, image | text | Text or image watermark. | |
| text (required when used) | string | text | mode = text | Watermark text, up to 160 characters. Required in text mode. | |
| fontFamily | string | text | mode = text | Text font: blank keeps the bold sans; gf:<id> embeds a family of the font catalog (/docs/fonts: every Google Fonts family, all scripts, shaped for Devanagari, Bengali, Tamil, Telugu and Arabic); u:<id> one of your uploaded fonts (the id from your fonts in the Document editor; another person's or a deleted font is refused) (its bold face when it has one). | |
| opacity | number | 1 to 100 % | 35 | Opacity from 1 to 100 percent. | |
| position | enum | top-left, top-center, top-right, middle-left, middle-center, middle-right, bottom-left, bottom-center, bottom-right | bottom-right | Preset placement, one of nine spots. A custom spot uses positionMode=custom with xPercent and yPercent. | |
| positionMode | enum | preset, custom | preset | Use a preset or explicit percentage coordinates. | |
| xPercent | number | 0 to 100 | 50 | positionMode = custom | Horizontal centre of the watermark as a percentage of the image width; the watermark is kept inside the image. |
| yPercent | number | 0 to 100 | 50 | positionMode = custom | Vertical centre of the watermark as a percentage of the image height, from the top; the watermark is kept inside the image. |
| margin | number | 0 to 2000 px | 20 | Edge margin in pixels for preset placement. | |
| scale | number | 5 to 100 % | 30 | mode = image | Width of an image watermark as a percentage of the image width. |
| pattern | enum | single, tile | single | Single or tiled watermark. | |
| tileSpacing | number | 40 to 1000 px | 180 | pattern = tile | Spacing between repeated watermarks in pixels. |
| rotation | number | -180 to 180 degrees | 0 | Rotation in degrees, counter-clockwise. | |
| fontSize | number | 10 to 240 px | mode = text | Text size in pixels. When omitted it is a fourteenth of the image width, at least 18. | |
| color | string | text | #101511 | mode = text | Text color as a six-digit hex color. |
| outputFormat | enum | same, jpg, png, webp, avif, tiff | same | Keep the input format or encode a specific output format. | |
| quality | number | 1 to 100 % | 85 | Lossy encoder quality for JPG, WebP, or AVIF output (AVIF defaults to 55). | |
| background | string | text | #ffffff | Six-digit hex background used when transparent pixels are encoded as JPG. | |
| outputName | string | text | Output file name without a path; the extension is added for you. |
Web page to PDF or image (web-capture)
Capture a web address or pasted HTML as a PDF or a PNG, JPEG or WebP image.
Inputs: 1 of text/html, text/plain, up to 10 MiB. Output: PDF document (application/pdf), or a PNG, JPEG or WebP image, as chosen by output.
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=web-capture
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| source | enum | html, url | html | html renders the uploaded HTML with scripts off; url captures a public web address. | |
| url | string | text | source = url | Public address to capture. When empty, the input file's text is the address. | |
| output | enum | pdf, png, jpeg, webp | What to make: a PDF, or a PNG, JPEG or WebP image. | ||
| pageSize | enum | A4, Letter, Legal, A3 | A4 | output = pdf | PDF page size. |
| orientation | enum | portrait, landscape | portrait | output = pdf | PDF orientation. |
| margin | enum | no-margin, small, big | small | output = pdf | PDF margin: no-margin 0, small 0.5 in, big 0.75 in. |
| fullPage | boolean | true, false | false | Capture the whole page (one long PDF page, or a full-length image) instead of the first screen. | |
| screenSize | enum | desktop, laptop, tablet, mobile | desktop | Browser window: desktop 1365x768, laptop 1440x900, tablet 834x1112, mobile 390x844. | |
| viewportWidth | number | 320 to 2400 px | Exact window width; overrides screenSize. | ||
| viewportHeight | number | 240 to 2400 px | Exact window height; overrides screenSize. | ||
| delayMs | number | 0 to 3000 ms | Wait after the page loads before capturing (an image waits 250 ms when this is omitted). | ||
| quality | number | 1 to 100 % | 86 | output = jpeg or webp | JPEG or WebP quality. |
| transparentBackground | boolean | true, false | false | output = png | Keep a transparent background. |
| blockAds | boolean | true, false | false | output = pdf | Try to block advertising requests. |
| removeOverlays | boolean | true, false | false | output = pdf | Try to remove pop-up overlays from a captured web address. |
| outputName | string | text | Output file name without a path; the extension is added for you. |
Word to PDF (word-to-pdf)
Convert document files to PDF.
Inputs: 1 of application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.oasis.opendocument.text. Output: PDF document (application/pdf).
Generate code with your own settings, or with this tool as one of up to 10 steps: /docs/developer-api/snippet-builder?start=word-to-pdf
| Option | Type | Values | Default | Used when | Description |
|---|---|---|---|---|---|
| outputName | string | text | Output file name without a path; the extension is added for you. |