# Pdf4me

PDF4me provides robust, secure, and scalable APIs for document generation, manipulation, and management, enabling easy integration and automation across various applications.

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

## Tools

### Convert to PDF

**Slug:** `PDF4ME_CONVERT_TO_PDF`

Tool to convert various document and image formats to PDF. Handles one file per call; multi-file PDFs require multiple calls followed by a separate merge step. Conversion permanently removes interactive form field editability — retain the original file as backup, and ensure all form fields are populated before converting. Use when you need to transform base64-encoded files into PDFs before further processing.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `document` | object | Yes | Document object with base64 data and optional filename. Must include `docData` field containing base64-encoded file bytes — URLs and file paths will fail validation. |
| `pdfConvertActions` | array | No | List of conversion option sets. If omitted, default conversion is applied. |

#### 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 Text from PDF

**Slug:** `PDF4ME_EXTRACT_TEXT`

Tool to extract embedded text from text-based PDFs using PDF4me's ExtractResources endpoint. Use when you need to retrieve searchable text content from PDFs for analysis or processing. This tool does not perform OCR; for scanned or image-only PDFs, use OCR endpoints instead.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `docData` | string | Yes | Base64-encoded PDF file content from which to extract text. |
| `docName` | string | Yes | PDF file name with .pdf extension for document identification. |

#### 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 |

### Fill PDF Form

**Slug:** `PDF4ME_FILL_PDF_FORM`

Tool to fill PDF form fields programmatically using JSON or XML data. Use when you need to generate reports or populate forms from various data sources with mail merge functionality. Supports filling multiple documents from a list of data collection items.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `metaData` | string | No | Additional metadata string for the form filling operation. |
| `dataArray` | string | Yes | Stringified JSON array of field data objects to fill. Must be a JSON string, not a JSON array object. Example: '[{"Name":"John Doe","Email":"john@example.com"}]' |
| `outputType` | string | Yes | Output format specification. Typically 'PDF' for PDF output. |
| `metaDataJson` | string | No | Metadata in JSON string format for advanced configuration. |
| `InputFormData` | array | Yes | Array of form data objects with field name-value pairs matching PDF form fields. Each object contains key-value pairs where keys are form field names and values are the data to fill. Example: [{"Name":"John Doe","Email":"john@example.com"}] |
| `inputDataType` | string | Yes | Data type for input data. Use 'JSON' for JSON data or 'XML' for XML data. |
| `templateDocName` | string | Yes | PDF template filename with .pdf extension to be filled. |
| `templateDocContent` | string | Yes | Base64-encoded PDF form template content. |

#### 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 |

### Read Barcodes from Image

**Slug:** `PDF4ME_READ_BARCODES_FROM_IMAGE`

Tool to read and extract barcode or QR code data from image files (JPG/PNG). Use when you need to decode barcodes from images for data extraction or verification. Supports various barcode types including QR codes, Code128, DataMatrix, and more.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `docName` | string | Yes | Image file name with extension (e.g., 'barcode.png', 'scan.jpg'). |
| `imageType` | string ("jpg" | "png") | Yes | Image file format: jpg or png. |
| `docContent` | string | Yes | Base64-encoded image file content containing barcodes to be read. |

#### 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 |
