# PDF.co

PDF.co is a REST API platform for PDF automation including PDF extraction, generation, editing, splitting, merging, form filling, barcode processing, OCR, document parsing, file conversion (PDF to Excel/CSV/JSON/XML/HTML/Image and vice versa), and AI-powered invoice parsing.

- **Category:** documents
- **Auth:** API_KEY
- **Composio Managed App Available?** N/A
- **Tools:** 35
- **Triggers:** 0
- **Slug:** `PDF_CO`
- **Version:** 20260316_00

## Tools

### Get Account Balance Info

**Slug:** `PDF_CO_ACCOUNT_BALANCE_INFO`

Tool to get account balance info. Use after authenticating to check remaining credits.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Generate Barcode (Deprecated)

**Slug:** `PDF_CO_BARCODE_GENERATE`

DEPRECATED: Use PDFCOPostBarcodeGenerate instead. Tool to generate barcode images (QR, Code128, Code39, PDF417, etc.). Use when you need to encode data into barcodes on the fly.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No | Filename for the generated barcode (extension added automatically). |
| `type` | string | Yes | Barcode type (e.g., Code128, QRCode, Code39, PDF417). |
| `value` | string | Yes | Data/content to encode in the barcode. |
| `async_` | boolean | No | Process request asynchronously. |
| `margin` | integer | No | Margin (white border) size around barcode in pixels. |
| `addText` | boolean | No | Display human-readable text below the barcode. |
| `fontName` | string | No | Font name for human-readable text (e.g., 'Arial'). |
| `fontSize` | integer | No | Font size (points) for human-readable text. |
| `backColor` | string | No | Barcode background color (hex or rgba). |
| `foreColor` | string | No | Barcode foreground color (hex e.g., '#000000' or rgba string). |
| `resolution` | integer | No | Image resolution in DPI. |
| `aspectRatio` | number | No | Aspect ratio (width/height) for 2D barcodes. |
| `pdfPassword` | string | No | Password to protect PDF if output format is 'pdf'. |
| `barcodeWidth` | integer | No | Width of the barcode image in pixels. |
| `outputFormat` | string | No | Output image format ('png', 'jpg', 'pdf'). |
| `barcodeHeight` | integer | No | Height of the barcode image in pixels. |
| `caseSensitive` | boolean | No | Treat barcode value as case-sensitive. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Convert Excel to CSV

**Slug:** `PDF_CO_CONVERT_EXCEL_TO_CSV`

Tool to convert an Excel file (XLS/XLSX) to CSV. Use when you have a public Excel file URL and need CSV output. Inline option returns data inline; otherwise provides download URL.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | Link to source XLS or XLSX file to be converted to CSV |
| `name` | string | No | Desired name for the output CSV file |
| `pages` | string | No | Pages to convert (e.g., '0-2,4'), default is all pages |
| `inline` | boolean | No | If true, returns CSV data inline; otherwise returns URL to CSV |
| `password` | string | No | Password for a protected Excel file, if applicable |
| `profiles` | string | No | Conversion profiles in JSON format, see PDF.co docs for structure |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Convert Excel to HTML

**Slug:** `PDF_CO_CONVERT_EXCEL_TO_HTML`

Tool to convert an Excel file to HTML. Use when you have an Excel URL and need HTML output.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | URL to the source Excel file (xls, xlsx, or csv). |
| `name` | string | No | Name for the resulting HTML file (e.g., 'report.html'). |
| `async` | boolean | No | Set to true to run the conversion asynchronously. |
| `profiles` | string | No | Conversion profiles as a JSON string. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Convert Excel to JSON

**Slug:** `PDF_CO_CONVERT_EXCEL_TO_JSON`

Tool to convert an online Excel or CSV file to JSON format. Use when you have a public file URL and need structured data extraction.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | Public URL of the source Excel/CSV file. |
| `name` | string | No | Desired name for the generated JSON file. |
| `pages` | string | No | Comma-separated page indices or ranges to process, e.g., '1,3-5'. |
| `password` | string | No | Password for password-protected files. |
| `profiles` | string | No | Custom processing profiles in JSON format. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Convert Excel to Text

**Slug:** `PDF_CO_CONVERT_EXCEL_TO_TEXT`

Tool to convert Excel files to plain text. Use after providing an Excel file URL to extract spreadsheet content.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | Link to the source Excel file (xls, xlsx, or csv). |
| `name` | string | No | Optional name for the output file. |
| `pages` | string | No | Comma-separated list of sheet indices to convert, e.g., '0,2'. |
| `inline` | boolean | No | Set to true to return data inline in response instead of URL. |
| `encrypt` | boolean | No | Set to true to encrypt the resulting file. |
| `password` | string | No | Password for password-protected Excel files. |
| `profiles` | string | No | Conversion profiles in JSON format. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Convert Excel to XML

**Slug:** `PDF_CO_CONVERT_EXCEL_TO_XML`

Tool to convert an Excel file to XML. Use when needing XML output from xls/xlsx/csv synchronously or asynchronously.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | URL to the source file (xls, xlsx or csv). |
| `name` | string | No | Output file name. |
| `async` | boolean | No | Set true to run asynchronously, returning a jobId. |
| `inline` | boolean | No | Set true to return XML inline, otherwise returns file URL. |
| `callback` | string | No | Callback URL for async mode, used when async is true. |
| `profiles` | object | No | Profiles settings. |
| `expiration` | integer | No | Link expiration time in minutes. |
| `httppassword` | string | No | HTTP auth password for source URL. |
| `httpusername` | string | No | HTTP auth user name for source URL. |
| `worksheetIndex` | integer | No | Worksheet index (1-based). |
| `DataDecryptionIV` | string | No | Initialization vector for decryption. |
| `DataEncryptionIV` | string | No | Initialization vector for encryption. |
| `DataDecryptionKey` | string | No | Decryption key. |
| `DataEncryptionKey` | string | No | Encryption key. |
| `DataDecryptionAlgorithm` | string ("AES128" | "AES192" | "AES256") | No | Decryption algorithm (AES128, AES192, AES256). |
| `DataEncryptionAlgorithm` | string ("AES128" | "AES192" | "AES256") | No | Encryption algorithm (AES128, AES192, AES256). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Document Parser

**Slug:** `PDF_CO_DOCUMENT_PARSER`

Tool to parse documents based on predefined templates to extract structured data. Use when you need to extract structured fields from a PDF by supplying a custom template.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | No | Public URL of the PDF to parse. Required if not uploading a file. Must be a publicly accessible HTTP/HTTPS URL or a file previously uploaded to PDF.co storage. |
| `file` | string | No | Raw PDF file bytes to upload directly. Required if not providing a URL. |
| `name` | string | No | Custom name for the output/result file. |
| `pages` | string | No | Comma-separated page indices or ranges to process (e.g., '0,2-4'). If not specified, all pages are processed. |
| `inline` | boolean | No | Return parsed results inline in the response body instead of generating a file URL. |
| `password` | string | No | Password for protected PDF files. |
| `template` | string | Yes | Inline YAML/JSON parsing template to extract structured data. The template defines fields to extract using regex patterns, rectangles, or static values. Example format: {"templateVersion": 3, "templatePriority": 1, "sourceId": "invoice", "fields": {"total": {"type": "regex", "expression": "TOTAL{{Spaces}}({{Number}})"}}} |
| `async_req` | boolean | No | Run parsing asynchronously and return a result URL instead of inline data. |
| `outputFormat` | string | No | Output format for parsed data: JSON, CSV, or XML. Default is JSON. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Upload File

**Slug:** `PDF_CO_FILE_UPLOAD`

Tool to upload a local file or remote URL to PDF.co, returning a hosted URL for downstream processing. Use when a PDF.co tool (e.g., PDF_CO_PDF_FROM_HTML) requires a remote URL but you have a local file.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | No | URL of the file to upload to PDF.co. The file will be downloaded from this URL and uploaded. Either 'url' or 'file' must be provided, but not both. |
| `file` | object | No | File to upload to PDF.co. Either 'file' or 'url' must be provided, but not both. |
| `name` | string | No | Optional custom filename to assign on PDF.co (defaults to the file's original name). |
| `run_async` | boolean | No | Whether to execute the upload asynchronously (defaults to false). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Check Job Status

**Slug:** `PDF_CO_JOB_CHECK`

Tool to check status and result of an asynchronous job. Use after submitting a job to poll for completion.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `force` | boolean | No | Set true to forcibly check long-running jobs. When true, returns 'unknown' for invalid job IDs instead of 'working'. |
| `job_id` | string | Yes | The unique identifier of the asynchronous job to check status for |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Add Content to PDF

**Slug:** `PDF_CO_PDF_ADD`

Tool to add content to an existing PDF. Use when you need to overlay text, images, barcodes, or links before distributing the file.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | Link to the source PDF file |
| `name` | string | No | Desired name for the result PDF file |
| `pages` | string | No | Comma-separated page indices (e.g., '0,2-4') to process; defaults to all pages |
| `objects` | array | Yes | List of objects to add (text, image, barcode, link, document, etc.). See API docs for structure. |
| `password` | string | No | Password for protected PDF, if needed |
| `run_async` | boolean | No | Run the process asynchronously; if true, returns a jobId for status checking |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Change PDF Text Searchable

**Slug:** `PDF_CO_PDF_CHANGE_TEXT_SEARCHABLE`

Tool to make PDF text searchable using OCR. Use when you need to add a searchable text layer to scanned or image-only PDF documents.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | Public URL of the source PDF file. |
| `rect` | string | No | Comma-separated rectangle coordinates 'left,top,width,height' to limit OCR. |
| `pages` | string | No | Pages to process (e.g., '0,2-5,7'). Defaults to all pages. |
| `inline` | boolean | No | Whether to return the processed PDF data inline (base64) or as a URL. Set to true for inline response, false for URL. |
| `language` | string | No | Language code for OCR (default: eng). |
| `password` | string | No | Password for encrypted PDF, if applicable. |
| `profiles` | string | No | JSON string with advanced OCR profiles and configurations. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Generate Barcode

**Slug:** `PDF_CO_PDFCO_POST_BARCODE_GENERATE`

Tool to generate high quality barcode images in 45+ formats including QR Code, Code 128, Code 39, and more. Use when you need to create barcodes with customization options like rotation, decoration images for QR codes, or async processing.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No | Output filename for the generated barcode image. |
| `type` | string ("AustralianPostCode" | "Aztec" | "Codabar" | "CodablockF" | "Code128" | "Code16K" | "Code39" | "Code39Extended" | "Code39Mod43" | "Code39Mod43Extended" | "Code93" | "DataMatrix" | "DPMDataMatrix" | "EAN13" | "EAN2" | "EAN5" | "EAN8" | "GS1DataBarExpanded" | "GS1DataBarExpandedStacked" | "GS1DataBarLimited" | "GS1DataBarOmnidirectional" | "GS1DataBarStacked" | "GTIN12" | "GTIN13" | "GTIN14" | "GTIN8" | "IntelligentMail" | "Interleaved2of5" | "ITF14" | "MaxiCode" | "MICR" | "MicroPDF" | "MSI" | "PatchCode" | "PDF417" | "Pharmacode" | "PostNet" | "PZN" | "QRCode" | "RoyalMail" | "RoyalMailKIX" | "Trioptic" | "UPCA" | "UPCE" | "UPU") | No | Barcode format to generate. Defaults to QRCode. |
| `async` | boolean | No | Enable background processing; returns jobId for status checks. Defaults to false. |
| `value` | string | Yes | The string value to be encoded into the barcode. |
| `inline` | boolean | No | Return results within response (true) or return URL (false). Defaults to false. |
| `encrypt` | boolean | No | Enable encryption for the output file. |
| `callback` | string | No | Webhook URL to receive results when async operation completes. |
| `expiration` | integer | No | Output link expiration time in minutes. Defaults to 60. |
| `profiles.Angle` | integer ("0" | "90" | "180" | "270") | No | Rotation angle in degrees. Defaults to 0. |
| `decorationImage` | string | No | Image URL for logo insertion within QR codes. |
| `outputDataFormat` | string | No | Set to 'base64' for base64-encoded output. |
| `profiles.CaptionFont` | string | No | Caption text font and size. Defaults to 'Arial, 12'. |
| `profiles.NarrowBarWidth` | integer | No | Narrow bar width in pixels. Defaults to 3. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Upload File from Base64

**Slug:** `PDF_CO_PDFCO_POST_FILE_UPLOAD_BASE64`

Tool to create a temporary file using base64-encoded source data. Use when you need to upload file content as base64 to PDF.co for downstream processing. Temporary files are automatically deleted after 1 hour (or custom expiration time).

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `file` | string | Yes | Base64-encoded file bytes with data URI prefix. Must include format like 'data:image/gif;base64,R0lGODlh...' or 'data:text/plain;base64,SGVsbG8gV29ybGQh...' |
| `name` | string | No | Custom file name for the output. If not provided, a default name will be used. |
| `expiration` | integer | No | Link expiration time in minutes. Default is 60 minutes. Maximum varies by subscription plan. The temporary file is automatically deleted after expiration. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete PDF Pages

**Slug:** `PDF_CO_PDF_DELETE_PAGES`

Tool to delete specific pages from a PDF file. Use when you need to remove unwanted pages before further processing.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | URL or base64-encoded content of the source PDF. |
| `name` | string | No | Optional name for the resulting PDF file. |
| `pages` | string | Yes | Comma-separated list of page indices or ranges to delete (1-based). E.g., '1,3-5' to delete pages 1, 3, 4, and 5. |
| `password` | string | No | Password for protected PDF file. |
| `profiles` | string | No | Optional JSON string for advanced configuration. |
| `async_job` | boolean | No | Process request asynchronously. If true, returns a job ID instead of immediate URL. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Extract PDF Attachments

**Slug:** `PDF_CO_PDF_EXTRACT_ATTACHMENTS`

Tool to extract embedded attachments from a PDF. Use when you need to retrieve embedded files from a PDF after uploading.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | URL of the input PDF file to process. |
| `inline` | boolean | No | If true, returns attachment data inline; otherwise returns URLs. |
| `callback` | string | No | Webhook URL for receiving async results. |
| `password` | string | No | Password for protected PDF file (if applicable). |
| `async_job` | boolean | No | Run processing asynchronously. If true, returns a jobId for async processing. |
| `expiration` | integer | No | Set the expiration time for the output link in minutes. Default is 60. |
| `httppassword` | string | No | HTTP authentication password for accessing the source URL. |
| `httpusername` | string | No | HTTP authentication username for accessing the source URL. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Find Text in PDF

**Slug:** `PDF_CO_PDF_FIND`

Tool to find text in a PDF document. Use when you need to locate keywords or regex patterns and get their page positions.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | Publicly accessible URL of the PDF file to search. |
| `pages` | string | No | Comma-separated page ranges to search, e.g., '1-3,5'. |
| `password` | string | No | Password for protected PDF, if applicable. |
| `profiles` | string | No | Advanced JSON configuration for PDF processing. |
| `regexSearch` | boolean | No | Whether to treat searchString as a regular expression (default: false). |
| `searchString` | string | Yes | Keyword or regex pattern to find in the document. |
| `caseSensitive` | boolean | No | Whether the search is case-sensitive (default: false). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### PDF Forms Info Reader

**Slug:** `PDF_CO_PDF_FORMS_INFO_READER`

Tool to extract form field information from a PDF. Use when you need to retrieve names, types, and values of form fields. Returns field names, types (CheckBox, EditBox, RadioButton, ComboBox), values, and position coordinates.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | Publicly accessible URL of the PDF file containing form fields. |
| `async` | boolean | No | If true, runs the job asynchronously and returns a jobId for status checking. |
| `password` | string | No | Password for encrypted PDF, if applicable. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Convert Text to PDF

**Slug:** `PDF_CO_PDF_FROM_DOCUMENT_TXT`

Tool to convert plain text data to PDF. Use when you need to generate a PDF from raw text content or text file links.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | Link to source text file or raw text content. |
| `name` | string | Yes | Name of the resulting PDF file (e.g., 'result.pdf'). |
| `profiles` | string | No | Optional JSON-formatted string with advanced API options. |
| `async_job` | boolean | No | Run processing asynchronously; if true, returns a jobId for status checking. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Convert Email to PDF

**Slug:** `PDF_CO_PDF_FROM_EMAIL`

Tool to convert email files (.eml/.msg) to PDF. Use when you need to transform standalone email messages into PDF documents.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | Direct URL to the input EML or MSG file. Must be a publicly reachable URL; local file paths and raw content strings are not accepted. |
| `name` | string | No | Optional name for the resulting PDF file. |
| `profiles` | string | No | Advanced configuration options as JSON-formatted string. Use `{'embedAttachments':false}` to exclude attachments when processing large emails to avoid timeouts. |
| `async_job` | boolean | No | Run processing asynchronously; if true, returns a jobId for status checking. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Convert HTML to PDF

**Slug:** `PDF_CO_PDF_FROM_HTML`

Tool to convert HTML code or webpage URL into a PDF document. Use when you need to capture a webpage or HTML snippet as a PDF file.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | The HTML page or resource URL to convert into PDF. Must be a reachable HTTP(S) URL; raw HTML strings and local file paths are not accepted. Upload local HTML files first to obtain a URL. |
| `name` | string | No | Desired output filename for the PDF result. |
| `footer` | string | No | HTML snippet for page footers applied to each page. |
| `header` | string | No | HTML snippet for page headers applied to each page. |
| `margins` | string | No | Custom page margins in '{top} {right} {bottom} {left}' format (units: px, mm, cm, in). |
| `callback` | string | No | Webhook URL to receive asynchronous results when async=true. |
| `profiles` | string | No | Advanced conversion profiles/settings as JSON string. |
| `async_job` | boolean | No | Run conversion as background job; returns jobId when true. |
| `mediaType` | string | No | CSS media type: 'print', 'screen', or 'none'. |
| `paperSize` | string | No | Paper size: standard like 'Letter', 'Legal', 'A4'–'A6', or custom '200px 300px', '8in 10in'. |
| `expiration` | integer | No | Expiration time in minutes for the output file link. |
| `orientation` | string | No | Document orientation: 'Portrait' or 'Landscape'. |
| `printBackground` | boolean | No | Include background graphics (colors/images) if true. |
| `DoNotWaitFullLoad` | boolean | No | If true, speeds up conversion by not waiting for full page load. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### PDF Info Reader

**Slug:** `PDF_CO_PDF_INFO_READER`

Tool to retrieve detailed information and metadata of a PDF. Use when you need page count, author, encryption details, and other document properties.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | URL to the source PDF file |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Merge PDFs

**Slug:** `PDF_CO_PDF_MERGE`

Tool to merge multiple PDF files into one document. Use when you need to combine several PDF URLs into a single PDF file.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No | Optional name for the resulting PDF file (must end with .pdf) |
| `urls` | string | Yes | Comma-separated string of PDF URLs or a list of PDF URLs to merge. Each URL must point to a publicly accessible or presigned PDF file. |
| `profiles` | string | No | (Advanced) Custom JSON profiles for processing. |
| `run_async` | boolean | No | Run the merge asynchronously; if true returns a jobId for status checking. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Rotate PDF Pages

**Slug:** `PDF_CO_PDF_ROTATE`

Tool to rotate selected pages in a PDF. Use when you need to adjust the orientation of specific pages in an online PDF file before further processing.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | URL of the source PDF file to rotate |
| `name` | string | No | Optional filename for the resulting PDF (should end with .pdf) |
| `angle` | integer ("90" | "180" | "270") | Yes | Rotation angle in degrees; must be one of 90, 180, or 270 |
| `pages` | string | Yes | Comma-separated list of page indices or ranges to rotate (e.g., '0,2-5') |
| `password` | string | No | Password for encrypted PDFs, if required |
| `run_async` | boolean | No | Run the operation asynchronously; if true, returns a jobId for status checking |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Search and Delete Text in PDF

**Slug:** `PDF_CO_PDF_SEARCH_AND_DELETE_TEXT`

Tool to search for and delete text in a PDF by keyword or regex. Use when you need to remove sensitive or unwanted text from a PDF document.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | URL or base64 content of the source PDF file. |
| `name` | string | No | Desired output filename for the PDF result. |
| `pages` | string | No | Comma-separated list of page indices or ranges to process (0-based), e.g., '0,2-5'. |
| `regex` | boolean | No | Treat searchString as regular expression. |
| `password` | string | No | Password for protected PDF if required. |
| `async_job` | boolean | No | Run operation asynchronously. Returns jobId if true. |
| `searchString` | string | Yes | Text string or regex pattern to search and delete. |
| `caseSensitive` | boolean | No | Enable case-sensitive matching. Default is true. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Search and Replace Text in PDF

**Slug:** `PDF_CO_PDF_SEARCH_AND_REPLACE_TEXT`

Tool to search for and replace text in a PDF document. Use when you need to update specific text instances within an existing PDF file (e.g., changing invoice numbers).

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | Publicly accessible URL of the source PDF file. |
| `name` | string | No | Optional name for the resulting PDF file. |
| `password` | string | No | Password for protected PDF, if required. |
| `async_job` | boolean | No | Set to true to run process asynchronously (returns jobId). |
| `regexSearch` | boolean | No | Enable regular expression search if true. |
| `searchString` | string | Yes | Text to search for in the document. |
| `replaceString` | string | Yes | Text to replace each found occurrence with. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Split PDF

**Slug:** `PDF_CO_PDF_SPLIT`

Tool to split a PDF into multiple files by page ranges. Use when you need to extract specific pages or page ranges from a PDF.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | No | Public URL of the PDF file to split. |
| `name` | string | No | Base name for output files; each part receives a suffix. |
| `pages` | string | No | Comma-separated or dash page ranges to split, e.g. '1-2,4'. 1-based indexing; omit to split all pages. |
| `inline` | boolean | No | Return split documents inline (base64) instead of URLs. |
| `callback` | string | No | Webhook URL for async notifications; only used when run_async is True. |
| `password` | string | No | Owner password for encrypted PDF files, if any. |
| `profiles` | object | No | Advanced processing profiles as JSON-formatted dict. |
| `file_path` | string | No | Local path to the PDF file to upload instead of using URL. |
| `run_async` | boolean | No | Run processing asynchronously; returns jobId instead of immediate results. |
| `expiration` | integer | No | Minutes before temporary output links expire; default is service default. |
| `httppassword` | string | No | HTTP basic auth password if the source URL is protected. |
| `httpusername` | string | No | HTTP basic auth username if the source URL is protected. |
| `DataEncryptionIV` | string | No | Base64-encoded IV for output data encryption. |
| `outputDataFormat` | string | No | Set to 'base64' to return split PDFs as base64 strings. |
| `DataEncryptionKey` | string | No | Base64-encoded key for output data encryption. |
| `DataEncryptionAlgorithm` | string | No | Algorithm for user-controlled output encryption (AES128, AES192, AES256). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Convert PDF to CSV

**Slug:** `PDF_CO_PDF_TO_CSV`

Tool to convert PDF or scanned images to CSV format. Use when you need to extract tabular data from a PDF into CSV format.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | Link to the PDF file to be converted. |
| `lang` | string | No | Language for OCR text recognition (e.g., 'eng', 'deu'). |
| `name` | string | No | Optional name for the output CSV file (must end with .csv). |
| `pages` | string | No | Comma-separated page indices or ranges to convert (e.g., '1,3-5'). |
| `inline` | boolean | No | If true, returns CSV data inline; otherwise returns a URL to the CSV. |
| `encrypt` | boolean | No | If true, encrypts the output CSV file. |
| `password` | string | No | Password for protected PDF files, if required. |
| `profiles` | string | No | Advanced conversion settings in JSON format. |
| `run_async` | boolean | No | Run job asynchronously; returns jobId for status checking. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Convert PDF to HTML

**Slug:** `PDF_CO_PDF_TO_HTML`

Tool to convert PDF documents to HTML. Use when you need an HTML rendition of a PDF or scanned image.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | No | URL to the source PDF file. Must be a publicly accessible HTTP/HTTPS URL (without authentication) or a file previously uploaded to PDF.co storage. Local file paths (file:// URLs) are not supported - use the PDF_CO_FILE_UPLOAD action first to upload local files to PDF.co, then use the returned URL here. |
| `file` | string | No | Binary content of the PDF file to upload as an alternative to 'url'. |
| `name` | string | No | Desired name for the resulting HTML file (e.g., 'result.html'). |
| `pages` | string | No | Comma-separated page indices or ranges to convert (e.g., '0,2-4'). |
| `inline` | boolean | No | If true, returns raw HTML in the 'body' field instead of a URL link. |
| `encrypt` | boolean | No | Whether to encrypt the output HTML file. |
| `password` | string | No | Password for protected PDF files, if required. |
| `profiles` | string | No | Additional conversion profiles as a JSON string. |
| `run_async` | boolean | No | Set to true to run the conversion asynchronously. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Convert PDF to Image

**Slug:** `PDF_CO_PDF_TO_IMAGE`

Tool to convert PDF pages to images (PNG, JPG, TIFF). Use when you need image previews of PDF content.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `dpi` | integer | No | Resolution in DPI for the output images (1-300). |
| `url` | string | Yes | Link to the source PDF file. |
| `pages` | string | No | Comma-separated list of page indices or ranges to convert. For example: '1,3-5' to convert pages 1, 3, 4, and 5. |
| `password` | string | No | Password for protected PDF files, if required. |
| `profiles` | string | No | Custom JSON profiles for advanced conversion options. |
| `async_job` | boolean | No | Run processing asynchronously. Returns jobId when true. |
| `imageFormat` | string ("PNG" | "JPG" | "TIFF") | No | Output image format: PNG (default), JPG, or TIFF. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Convert PDF to JSON

**Slug:** `PDF_CO_PDF_TO_JSON`

Tool to convert PDF or scanned images to JSON format. Use when you need a structured JSON representation of PDF content.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | No | Link to the PDF file to be converted. |
| `file` | string | No | Binary content of the PDF file to convert. |
| `name` | string | No | Optional name for the output JSON file (should end with .json). |
| `async` | boolean | No | If true, runs the job asynchronously; returns jobId for status checking. |
| `pages` | string | No | Comma-separated page indices or ranges to convert (e.g., '1,3-5'). |
| `inline` | boolean | No | If true, returns JSON data inline; otherwise returns a URL. |
| `password` | string | No | Password for protected PDF files, if required. |
| `profiles` | string | No | Advanced conversion configuration in JSON format. |
| `searchString` | string | No | Optional text to search for in the PDF before conversion. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Convert PDF to Text

**Slug:** `PDF_CO_PDF_TO_TEXT`

Tool to convert PDF or scanned images to plain text. Use when you need raw text output preserving layout.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | URL to the source PDF or image file. Must be a publicly accessible HTTP/HTTPS URL (without authentication) or a file previously uploaded to PDF.co storage. Local file paths (file:// URLs) are not supported - use the PDF_CO_FILE_UPLOAD action first to upload local files to PDF.co, then use the returned URL here. |
| `lang` | string | No | OCR language(s) code, e.g. 'eng', or 'eng+deu'. |
| `name` | string | No | Desired name for the output file (e.g. 'result.txt'). |
| `rect` | string | No | Extraction rectangle in format '{x} {y} {width} {height}'. |
| `pages` | string | No | Comma-separated page indices or ranges to process (e.g. '0,2-4'). |
| `inline` | boolean | No | Return text inline in response instead of URL. |
| `unwrap` | boolean | No | Unwrap lines into a single line within table cells (only when lineGrouping='1'). |
| `callback` | string | No | Webhook URL to receive callback when async=true. |
| `password` | string | No | Password for protected PDF files. |
| `run_async` | boolean | No | Run process asynchronously; returns jobId if true. |
| `expiration` | integer | No | Expiration time in minutes for the output file link. |
| `httppassword` | string | No | HTTP auth password for source URL. |
| `httpusername` | string | No | HTTP auth username for source URL. |
| `lineGrouping` | string | No | Line grouping mode: '1', '2', or '3'. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Convert PDF to XLS

**Slug:** `PDF_CO_PDF_TO_XLS`

Tool to convert PDF or scanned images to XLS format. Use when you need to extract tabular data into an Excel spreadsheet.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | Link to the PDF file to be converted. |
| `name` | string | No | Optional name for the output XLS file (must end with .xls). |
| `pages` | string | No | Comma-separated page indices or ranges to convert (e.g., '1,3-5'). |
| `password` | string | No | Password for protected PDF files, if required. |
| `profiles` | string | No | Advanced conversion settings in JSON format. |
| `run_async` | boolean | No | Run job asynchronously; returns jobId for status checking. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Convert PDF to XLSX

**Slug:** `PDF_CO_PDF_TO_XLSX`

Tool to convert PDF or scanned images to XLSX (Excel) format. Use when you need structured spreadsheet output from a PDF.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | Link to the PDF file to be converted. |
| `name` | string | No | Optional name for the output XLSX file (must end with .xlsx). |
| `pages` | string | No | Comma-separated page indices or ranges to convert (e.g., '1,3-5'). |
| `inline` | boolean | No | If true, returns XLSX data inline; otherwise returns a URL to the XLSX. |
| `encrypt` | boolean | No | If true, encrypts the output XLSX file. |
| `password` | string | No | Password for protected PDF files, if required. |
| `profiles` | string | No | Advanced conversion settings in JSON format. |
| `run_async` | boolean | No | Run job asynchronously; returns processId for status checking. |
| `expiration` | integer | No | Expiration time for the output link in minutes (default is 60). |
| `optimization` | string | No | Optimization mode, e.g., 'ocr'. |
| `columns0Based` | boolean | No | Set to true if column indices in profiles are zero-based. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Convert PDF to XML

**Slug:** `PDF_CO_PDF_TO_XML`

Tool to convert PDF or scanned images to XML format. Use when you need to extract structured data from PDF into XML.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | Link to the PDF file to be converted. |
| `pages` | string | No | Comma-separated page indices or ranges to convert (e.g., '1,3-5'). |
| `password` | string | No | Password for protected PDF files, if required. |
| `profiles` | string | No | Advanced conversion settings in JSON format. |
| `run_async` | boolean | No | Run job asynchronously; returns jobId for status checking. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
