# PDF4me Developer Documentation — Full AI Reference (llms-full.txt) > Comprehensive endpoint-level reference for the PDF4me REST API V2. Written for AI assistants, LLM-based search engines, and developer tools. Covers every API endpoint with HTTP method, full parameter list, data types, output format, error behaviour, and real-world use cases. Also includes Word template syntax with examples, no-code integration guides for Power Automate, Zapier, Make, n8n, and PDF4me MCP, browser extensions, and the interactive API tester. --- ## About PDF4me PDF4me is an enterprise-grade cloud document automation platform. It provides a REST API, no-code connectors, browser extensions, and an AI-powered document processing engine. Developers use PDF4me to convert, merge, split, compress, sign, OCR, barcode, form-fill, extract data from, and generate PDF and Office documents programmatically — at any scale, from a single request to millions of documents per month. **Primary use cases:** invoice automation, contract generation, document archiving, digital signatures, scanned document processing, barcode tracking, form data capture, report generation, and document workflow automation. **Supported platforms:** REST API (any language), Power Automate, Zapier, Make (Integromat), n8n, PDF4me MCP (Cursor, VS Code, Claude Desktop, Windsurf), Chrome extension, Google Workspace add-on, Microsoft Teams app. **Code samples:** Available on GitHub at https://github.com/pdf4me/pdf4me-api-samples in C# (.NET 6/8), Java (8/11/21+), Python (3.7+), JavaScript (Node.js 14+), and Salesforce Apex. --- ## Authentication **Reference:** https://docs.pdf4me.com/general-guidelines/getting-started-api-portal/ **Dashboard:** https://dev.pdf4me.com/dashboard/ **Get API Key:** https://dev.pdf4me.com/dashboard/#/api-keys/ Every request to the PDF4me REST API must include an `Authorization` header using HTTP Basic authentication. The API key acts as the username; the password is left empty (but the colon separator is mandatory). **Encoding formula:** ``` Authorization: Basic base64("YOUR_API_KEY:") ``` Note the trailing colon — it is required. Omitting it is the most common cause of 401 errors. **Example — cURL:** ```bash curl -X POST "https://api.pdf4me.com/api/v2/ConvertToPdf" \ -H "Authorization: Basic $(echo -n 'YOUR_API_KEY:' | base64)" \ -H "Content-Type: application/json" \ -d '{"docContent":"","docName":"document.docx"}' ``` **Example — Python:** ```python import base64, requests api_key = "YOUR_API_KEY" token = base64.b64encode(f"{api_key}:".encode()).decode() headers = {"Authorization": f"Basic {token}", "Content-Type": "application/json"} ``` **Example — JavaScript (Node.js):** ```javascript const token = Buffer.from(`${apiKey}:`).toString('base64'); const headers = { 'Authorization': `Basic ${token}`, 'Content-Type': 'application/json' }; ``` **Example — C#:** ```csharp var token = Convert.ToBase64String(Encoding.ASCII.GetBytes($"{apiKey}:")); client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", token); ``` --- ## API Request Standards **Base URL:** `https://api.pdf4me.com` **Method:** POST for all document operations **Content-Type:** `application/json` **Max file size:** 100 MB per request **File input options:** - `docContent` — Base64-encoded file content (string). Use when the file is already in memory. - `docUrl` — Publicly accessible HTTPS URL to the source file. PDF4me fetches it server-side. The URL must be reachable without authentication. - `docName` — Filename including extension. The extension determines input format for conversion operations. **Response format:** JSON object. Processed document returned as `docContent` (Base64 string). Some endpoints return arrays or ZIP archives for multi-file outputs. **Asynchronous processing:** Large files or batch operations may return a `jobId` instead of an immediate result. Poll `GET /api/v2/JobResult/{jobId}` until `status` is `"Success"` then read `docContent` from the response. **HTTP status codes:** - `200 OK` — Request processed successfully. Result in response body. - `400 Bad Request` — Invalid parameters, malformed JSON, empty file, unsupported format, or password-protected file requiring a password. - `401 Unauthorized` — Missing or invalid API key. Check the trailing colon in the Basic auth encoding. - `402 Payment Required` — Account has no remaining credits or has hit the daily free-tier limit. - `403 Forbidden` — API key lacks permission for the requested operation. - `404 Not Found` — Endpoint path is incorrect. Verify you are using `/api/v2/` prefix. - `429 Too Many Requests` — Rate limit exceeded. Implement exponential backoff and retry. - `500 Internal Server Error` — Server-side error. Retry once; if it persists, contact support. --- ## Getting Started ### [Getting Started with the API Portal](https://docs.pdf4me.com/general-guidelines/getting-started-api-portal/) Step-by-step guide to getting your first API key and making your first request. Create a free PDF4me account at https://dev.pdf4me.com, navigate to Dashboard → API Keys, click "Generate New Key", and copy the key. The key is a long alphanumeric string. To test immediately, use the interactive API Tester at https://docs.pdf4me.com/url-api-tester/ — paste your key, upload a file, and run a conversion without writing any code. For code integration, Base64-encode `"YOUR_KEY:"` and send it as the `Authorization: Basic` header on every request. Free tier includes daily credits sufficient for development and testing. Paid plans are available for production volume. ### [Connect to the PDF4me V2 API](https://docs.pdf4me.com/general-guidelines/connect-to-pdf4meapi/) Technical deep-dive into the V2 REST API contract. Base URL is `https://api.pdf4me.com`. All endpoints use POST with a JSON body. File content is sent as a Base64 string in the `docContent` field, or as a public URL in `docUrl`. The `docName` field must include the correct file extension — it determines which conversion engine is used. For multi-file inputs (e.g., merge), use `docContents` (array of Base64 strings) and `docNames` (array of filenames). Responses always include `docContent` (Base64 output) and optional metadata. For async operations, the response contains `jobId`; poll `GET /api/v2/JobResult/{jobId}` with the same Authorization header until `"status": "Success"`. ### [Connect to Power Automate](https://docs.pdf4me.com/general-guidelines/connect-to-power-automate/) Install the PDF4me connector from the Microsoft Power Automate connector gallery (search "PDF4me"). Add a new connection: paste your API key when prompted. The connector provides 100+ actions covering all PDF4me API operations. In Power Automate flows, files are passed as binary content — no manual Base64 encoding is needed; the connector handles it. Supported trigger types: SharePoint file creation, OneDrive upload, email attachment, manual trigger, scheduled recurrence, HTTP webhook. Output files can be saved to SharePoint, OneDrive, Dropbox, email attachment, Teams channel, or any connector that accepts binary file content. ### [Connect to Zapier](https://docs.pdf4me.com/general-guidelines/connect-to-zapier/) Find PDF4me in the Zapier App Directory and connect your account using your API key. PDF4me actions appear as Zap steps — select the operation (e.g., "Convert to PDF"), map input file data from the trigger (Google Drive file, Gmail attachment, Dropbox file URL, webhook payload), and map the output file to a destination (save to Drive, send via email, upload to Dropbox, post to Slack). File data in Zapier is handled as file objects; PDF4me's Zapier integration accepts both file URLs and binary file content from previous steps. ### [Connect to Make (formerly Integromat)](https://docs.pdf4me.com/general-guidelines/connect-to-make/) Install the PDF4me app from the Make app marketplace. Create a connection by entering your API key. PDF4me modules in Make accept Make's native binary data buffers — files from Google Drive, Dropbox, HTTP download, or any file source module are passed directly. All 100+ API operations are available as individual Make modules. Modules return output files as binary data that can be passed to storage, email, or any downstream module. For batch scenarios, use Make's Iterator and Aggregator modules combined with PDF4me to process multiple files in a loop. ### [Connect to n8n](https://docs.pdf4me.com/general-guidelines/connect-to-n8n/) Install the PDF4me community node: in n8n, go to Settings → Community Nodes → Install `n8n-nodes-pdf4me`. After installation, add PDF4me credentials (API key). The PDF4me node accepts n8n binary data items — files from any n8n node (Google Drive, Dropbox, HTTP Request, FTP, S3) are passed directly without encoding. Output files are returned as binary data items that flow into storage or processing nodes. Works identically in self-hosted n8n and n8n Cloud. ### [PDF4me MCP — Getting Started](https://docs.pdf4me.com/integration/pdf4me-mcp/getting-started/) PDF4me MCP (Model Context Protocol) connects PDF4me document operations to AI coding tools: Cursor, VS Code (Copilot), Claude Desktop, Windsurf, and Continue. Install with `uvx pdf4me-mcp` (requires Python/uv). Configure in your MCP client's settings JSON: set `"command": "uvx"`, `"args": ["pdf4me-mcp"]`, and `"env": {"PDF4ME_API_KEY": "YOUR_KEY"}`. On Windows, use the full path to `uvx.exe` if it is not in PATH. After connecting, your AI assistant gains direct access to all PDF4me document operations — ask it to "convert this Word file to PDF" or "merge these two PDFs" and it calls the API on your behalf. --- ## Troubleshooting ### [401 Unauthorized](https://docs.pdf4me.com/general-guidelines/troubleshooting/401-unauthorized/) **HTTP Status:** 401 | **Error message:** "Not Authorized" Cause: The `Authorization` header is missing, malformed, or the API key has been revoked. Diagnosis checklist: 1. Confirm the header format is exactly `Authorization: Basic ` — note the capital B in "Basic" and the space before the token. 2. The Base64 string must encode `"YOUR_API_KEY:"` — the colon after the key is mandatory. Encoding `"YOUR_API_KEY"` without a colon produces a different token and always returns 401. 3. Copy the API key fresh from https://dev.pdf4me.com/dashboard/#/api-keys/ — avoid copy-paste errors that include invisible whitespace. 4. Check whether the key has been revoked or regenerated in the dashboard. 5. In Power Automate or Zapier: delete the connection and recreate it with the fresh key — cached connections do not update automatically. **Fix (any language):** Ensure Base64 input is `apiKey + ":"` (key followed by colon, nothing else). ### [402 Payment Required — No Credit or Daily Limit](https://docs.pdf4me.com/general-guidelines/troubleshooting/402-no-credit-daily-limit/) **HTTP Status:** 402 | **Error message:** "No Credit" or "Daily limit reached" Cause: Your account has exhausted its credit balance or hit the free-tier daily request limit. Each API operation consumes credits proportional to file size and operation complexity. Conversion operations typically cost 1 credit per page. OCR, AI parsing, and barcode reading cost more. Actions: - Check current balance and daily usage at https://dev.pdf4me.com/dashboard/ - Free tier resets daily — wait until the next day if you have hit the daily cap - Purchase credits or upgrade to a paid plan for production volume - In automated workflows, catch 402 responses and implement a pause-and-retry or alert mechanism ### [400 — File Is Empty or Could Not Open](https://docs.pdf4me.com/general-guidelines/troubleshooting/file-is-empty-could-not-open/) **HTTP Status:** 400 | **Error message:** "File is empty" or "Could not open document" Causes and fixes: - **Empty Base64:** The `docContent` field was sent as an empty string or null. Verify the file was read and encoded correctly before sending. - **Invalid Base64:** Padding errors or line breaks in the Base64 string corrupt the encoding. In most languages, use the standard library's Base64 encoder with no line-wrap mode. - **URL inaccessible:** If using `docUrl`, the URL must be publicly reachable. Test it in a browser or with `curl`. Private S3 buckets, Intranet URLs, and localhost addresses will fail. - **Password-protected PDF:** A locked PDF returns this error unless you supply the password in the request (use the `password` parameter where supported) or first unlock it with the Unlock PDF endpoint. - **Corrupt file:** Run the source file through a PDF validator or try opening it in a PDF reader before sending. A corrupt file cannot be processed. - **Zero-byte file:** Some flow platforms pass an empty binary object when a previous step fails. Add a condition to check that the file size is greater than 0 before calling PDF4me. ### [Zapier & Power Automate Integration Tips](https://docs.pdf4me.com/general-guidelines/troubleshooting/zapier-power-automate-tips/) Common problems and solutions for no-code platform integrations: - **Power Automate "Invalid file content":** Use the `File Content` output from OneDrive/SharePoint get-file actions, not the `Link` field. The connector expects binary content, not a URL. - **Zapier output is a URL, not a file:** PDF4me's Zapier action returns a file URL in `File URL` and binary data in `File`. Use the `File` field for downstream file operations; use `File URL` for browser-download links. - **File too large:** Free tier has a 10MB per-file limit. Paid plans support up to 100MB. Compress the file before sending or upgrade the plan. - **Make scenario: binary data missing:** Ensure the upstream module returns binary data (check with a Set Variable and inspect the data type). HTTP modules in Make must have "Parse Response" disabled when the response is a file. - **n8n: output not recognized as binary:** Add a "Move Binary Data" node after the PDF4me node to rename the binary property if the downstream node expects a specific property name. --- ## REST API — Convert **Documentation hub:** https://docs.pdf4me.com/pdf4me-api/convert/ All convert endpoints use **POST** to `https://api.pdf4me.com/api/v2/`. Input files are provided as `docContent` (Base64 string) or `docUrl` (public HTTPS URL). The `docName` field must carry the correct file extension — it tells the engine which parser to use. Output is always `docContent` (Base64) unless stated otherwise. ### [Convert to PDF](https://docs.pdf4me.com/pdf4me-api/convert/convert-to-pdf/) **POST** `/api/v2/ConvertToPdf` Converts 50+ file formats to PDF using server-side rendering. Supported input formats include: Microsoft Word (.doc, .docx), Excel (.xls, .xlsx), PowerPoint (.ppt, .pptx), OpenDocument Writer/Calc/Impress (.odt, .ods, .odp), RTF, TXT, CSV, HTML, JPEG, PNG, TIFF, BMP, GIF, WebP, SVG, Microsoft Visio (.vsdx, .vsd), and more. Parameters: - `docContent` (string, Base64) — The input file encoded as Base64. Either this or `docUrl` is required. - `docUrl` (string, URL) — Public HTTPS URL to the source file. PDF4me fetches it server-side. - `docName` (string) — Filename with extension, e.g. `"report.docx"`. The extension determines which conversion engine is used. Required. - `async` (boolean, optional) — Set `true` for large files. Returns a `jobId`; poll for result. Output: `docContent` (Base64 PDF string), `docName` (output filename with `.pdf` extension). Request example: ```json { "docContent": "", "docName": "invoice.docx" } ``` Use cases: generating PDF invoices from Word templates, converting user-uploaded Office files to PDF for viewing in browser, archiving Excel reports as PDF, converting legacy RTF documents to modern PDF format, building document ingestion pipelines that normalize all input formats to PDF. ### [Convert URL to PDF](https://docs.pdf4me.com/pdf4me-api/convert/convert-url-to-pdf/) **POST** `/api/v2/UrlToPdf` Renders a live public webpage to PDF using a headless browser engine. Captures the full rendered page including CSS styles, JavaScript-rendered content, images, web fonts, and dynamic elements. Equivalent to printing a webpage to PDF from Chrome. Parameters: - `url` (string) — The full public URL to render, e.g. `"https://example.com/invoice/123"`. Must be HTTPS and publicly accessible. Required. - `docName` (string, optional) — Output filename. Defaults to `"output.pdf"`. - `async` (boolean, optional) — Set `true` for large or slow-loading pages. Output: `docContent` (Base64 PDF). Use cases: archiving web receipts and order confirmations, generating PDF snapshots of web dashboards or reports, capturing dynamic pages rendered by JavaScript frameworks (React, Vue, Angular), creating print-friendly PDFs from web-based invoice systems, archiving web content for compliance. ### [Convert HTML to PDF](https://docs.pdf4me.com/pdf4me-api/convert/convert-html-to-pdf/) **POST** `/api/v2/HtmlToPdf` Converts HTML content — either as a raw string or as a Base64-encoded HTML file — to PDF. Supports full CSS3 styling, inline and embedded images (including base64-encoded `src` values), web fonts via `@font-face`, custom page sizes, and configurable margins. Parameters: - `docContent` (string, Base64) — A Base64-encoded `.html` file. Use this when you have an HTML file. - `htmlContent` (string) — Raw HTML string. Use this when generating HTML dynamically in code. - `docName` (string) — Must end in `.html`, e.g. `"email-template.html"`. Required. - `pageSize` (string, optional) — Page size: `"A4"`, `"A3"`, `"Letter"`, `"Legal"`. Default: `"A4"`. - `marginTop`, `marginRight`, `marginBottom`, `marginLeft` (number, optional) — Page margins in millimetres. Output: `docContent` (Base64 PDF). Use cases: generating invoices and receipts from HTML email templates, converting CMS-generated HTML to PDF for archiving, building PDF generation pipelines in web apps (send HTML string, receive PDF), creating PDFs from report builder output, generating printable pages from HTML/CSS layouts. ### [Convert Markdown to PDF](https://docs.pdf4me.com/pdf4me-api/convert/convert-markdown-to-pdf/) **POST** `/api/v2/ConvertToPdf` Converts Markdown (.md) files to formatted PDF documents. Markdown syntax — headings, bold, italic, lists, tables, code blocks, links, and blockquotes — is rendered to styled PDF content. Parameters: - `docContent` (string, Base64) — Base64-encoded Markdown file. Required. - `docName` (string) — Must end in `.md`, e.g. `"readme.md"`. Required. Output: `docContent` (Base64 PDF). Use cases: exporting README files and wikis to PDF, generating PDF documentation from Markdown sources, converting developer notes and changelogs to PDF for distribution, archiving Markdown-based knowledge base articles. ### [PDF to Word](https://docs.pdf4me.com/pdf4me-api/convert/convert-pdf-to-word/) **POST** `/api/v2/PdfToWord` Converts a PDF document to an editable Microsoft Word (.docx) file. The conversion engine preserves text flow, paragraph styles, headings, tables, images, and column layouts. For scanned or image-based PDFs, OCR is applied automatically to make the text selectable and editable in the output DOCX. Parameters: - `docContent` (string, Base64) — Base64-encoded PDF. Required. - `docName` (string) — Source filename, e.g. `"contract.pdf"`. Required. - `async` (boolean, optional) — Recommended for files above 5MB. Output: `docContent` (Base64 DOCX), `docName` (filename with `.docx` extension). Use cases: editing PDF contracts to revise terms, extracting and repurposing content from PDF reports, converting legacy PDF forms into editable Word templates, unlocking PDFs received from clients for editing, converting scanned documents to editable Word files via OCR. ### [PDF to Excel](https://docs.pdf4me.com/pdf4me-api/convert/convert-pdf-to-excel/) **POST** `/api/v2/PdfToExcel` Extracts tables and structured data from a PDF and converts them to a Microsoft Excel (.xlsx) workbook. The engine detects table boundaries, column headers, and cell data even in complex multi-column layouts. For scanned PDFs, OCR is applied before table extraction. Parameters: - `docContent` (string, Base64) — Base64-encoded PDF. Required. - `docName` (string) — Source filename, e.g. `"bank-statement.pdf"`. Required. - `async` (boolean, optional) — Recommended for PDFs with many pages. Output: `docContent` (Base64 XLSX), `docName` (filename with `.xlsx` extension). Use cases: extracting invoice line items from supplier PDFs into spreadsheets, converting bank statement PDFs to Excel for accounting reconciliation, pulling data from PDF reports into Excel for further analysis, automating data entry by converting PDF forms to structured spreadsheet data. ### [PDF to PowerPoint](https://docs.pdf4me.com/pdf4me-api/convert/convert-pdf-to-powerpoint/) **POST** `/api/v2/PdfToPowerPoint` Converts a PDF to a Microsoft PowerPoint (.pptx) presentation. Each page of the PDF becomes a separate editable slide in the output file. Images, text, and layout are preserved per slide. Parameters: - `docContent` (string, Base64) — Base64-encoded PDF. Required. - `docName` (string) — Source filename, e.g. `"presentation.pdf"`. Required. Output: `docContent` (Base64 PPTX), `docName` (filename with `.pptx` extension). Use cases: making received PDF slide decks editable in PowerPoint, repurposing PDF reports as presentation slides, converting PDF training materials into editable presentations for customisation. ### [Create PDF/A](https://docs.pdf4me.com/pdf4me-api/convert/create-pdfa/) **POST** `/api/v2/CreatePdfA` Converts any PDF to the PDF/A archival format — an ISO-standardised subset of PDF designed for long-term document preservation. PDF/A embeds all fonts, colour profiles, and metadata required for faithful reproduction without external dependencies. Parameters: - `docContent` (string, Base64) — Base64-encoded source PDF. Required. - `docName` (string) — Source filename. Required. - `pdfAConformanceLevel` (string) — Archival conformance level: - `"pdfA1b"` — PDF/A-1b: basic visual appearance preservation (most widely required) - `"pdfA2b"` — PDF/A-2b: adds support for JPEG 2000 compression and OpenType fonts - `"pdfA3b"` — PDF/A-3b: allows embedding any file type as an attachment (used for ZUGFeRD, Factur-X e-invoicing) Output: `docContent` (Base64 PDF/A), `isPdfACompliant` (boolean — `true` if validation passes after conversion). Use cases: regulatory compliance archiving (GDPR, HIPAA, SOX), government document submission, Swiss and EU e-invoice standards (ZUGFeRD uses PDF/A-3b), legal document preservation, long-term records management, ISO 19005-compliant archiving. ### [Flatten PDF](https://docs.pdf4me.com/pdf4me-api/convert/flatten-pdf/) **POST** `/api/v2/FlattenPdf` Flattens a PDF by merging all interactive layers — AcroForm fields, XFA form data, annotations, signatures, and comments — into the static page content. The result is a non-interactive PDF where all previously editable content is permanently baked in. Parameters: - `docContent` (string, Base64) — Base64-encoded PDF with form fields or annotations. Required. - `docName` (string) — Source filename. Required. Output: `docContent` (Base64 flattened PDF). Use cases: finalising completed PDF forms to prevent further editing, converting filled PDF applications to static records, preparing signed documents for archiving, removing form fields before sending PDFs to clients, preventing template re-use after generation. ### [Linearize PDF](https://docs.pdf4me.com/pdf4me-api/convert/linearize-pdf/) **POST** `/api/v2/LinearizePdf` Linearizes (or "fast web view optimises") a PDF so the first page is downloadable and displayable before the entire file has downloaded. The PDF's internal structure is reorganised so that page data appears sequentially from the first page, allowing browsers and PDF viewers to render incrementally. Parameters: - `docContent` (string, Base64) — Base64-encoded PDF. Required. - `docName` (string) — Source filename. Required. Output: `docContent` (Base64 linearized PDF). Use cases: optimising large PDF catalogues or reports served via CDN for faster first-page load, improving user experience for web-based PDF viewers, reducing perceived load time for PDF documents linked in emails, serving PDFs from document management systems with minimal initial load latency. ### [Convert JSON to Excel](https://docs.pdf4me.com/pdf4me-api/convert/convert-json-to-excel/) **POST** `/api/v2/JsonToExcel` Converts a structured JSON array to a Microsoft Excel (.xlsx) spreadsheet. The top-level array is iterated; each object's keys become column headers and values populate the rows. Nested objects are flattened to dot-notation column names. Parameters: - `docContent` (string, Base64) — Base64-encoded JSON file. Either this or `jsonContent` is required. - `jsonContent` (string) — Raw JSON string. Use this for dynamically generated JSON. - `docName` (string) — Output filename, e.g. `"report.json"` or `"data.xlsx"`. Required. Output: `docContent` (Base64 XLSX). Use cases: converting API response data to Excel for client delivery, generating Excel exports from database query results in JSON format, building download-as-Excel features in web applications, converting JSON logs or reports to spreadsheets for non-technical users. ### [Convert Visio to PDF](https://docs.pdf4me.com/pdf4me-api/convert/convert-visio/) **POST** `/api/v2/ConvertToPdf` Converts Microsoft Visio diagram files (.vsdx, .vsd) to PDF. Uses the universal ConvertToPdf endpoint — pass the Visio file with a `docName` that ends in `.vsdx` or `.vsd` to invoke the Visio conversion engine. All diagram pages, shapes, text labels, and connectors are preserved in the output PDF. Parameters: - `docContent` (string, Base64) — Base64-encoded Visio file. Required. - `docName` (string) — Must end in `.vsdx` or `.vsd`, e.g. `"network-diagram.vsdx"`. Required. Output: `docContent` (Base64 PDF). Use cases: sharing Visio diagrams with stakeholders who do not have Visio installed, archiving network or process diagrams as PDF, including Visio diagrams in PDF report bundles, converting IT architecture diagrams to PDF for documentation. ### [Convert Word to PDF Form](https://docs.pdf4me.com/pdf4me-api/convert/convert-word-to-pdf-form/) **POST** `/api/v2/WordToPdfForm` Converts a Word document that contains Word content controls (structured document tags) into an interactive PDF AcroForm. Text input controls become PDF text fields, checkbox controls become PDF checkboxes, and dropdown controls become PDF combo boxes. Field names in the output PDF match the content control titles from the Word document. Parameters: - `docContent` (string, Base64) — Base64-encoded DOCX file with content controls. Required. - `docName` (string) — Must end in `.docx`. Required. Output: `docContent` (Base64 interactive PDF with AcroForm fields). Use cases: converting Word-based form templates to fillable PDFs, migrating form infrastructure from Word to PDF without manual recreation, enabling web-based PDF form distribution from a Word source-of-truth, converting HR forms, applications, and surveys from Word to interactive PDF format. --- ## REST API — Edit **Documentation hub:** https://docs.pdf4me.com/pdf4me-api/edit/ Edit endpoints modify existing PDF documents — adding visual elements, annotations, stamps, signatures, margins, and embedded attachments. All use POST to `https://api.pdf4me.com/api/v2/`. ### [Add Header / Footer to PDF](https://docs.pdf4me.com/pdf4me-api/edit/add-header-footer-to-pdf/) **POST** `/api/v2/AddHeaderFooter` Injects HTML-formatted headers and footers into every page of a PDF. The HTML is rendered using a headless browser so CSS3 styling, custom fonts, images, and dynamic variables are all supported. Parameters: - `docContent` (string, Base64) — Base64-encoded source PDF. Required. - `docName` (string) — Source filename. Required. - `headerHtml` (string) — HTML string for the page header. Supports CSS and template variables. - `footerHtml` (string) — HTML string for the page footer. - `marginTop` (number) — Top margin in millimetres to create space for the header. - `marginBottom` (number) — Bottom margin in millimetres to create space for the footer. - `pageFrom` (integer, optional) — First page to apply header/footer (1-indexed). Default: 1. - `pageTo` (integer, optional) — Last page. Default: last page of document. Dynamic variables supported in HTML: `{pageNumber}` (current page), `{totalPages}` (total page count), `{date}` (today's date). Example header HTML: `
Confidential — Page {pageNumber} of {totalPages}
` Output: `docContent` (Base64 PDF with header/footer applied). Use cases: adding branded company headers to all pages of a report, inserting confidentiality notices, adding page numbers with total page count, date-stamping every page, creating consistent footers for legal documents. ### [Add Page Numbers](https://docs.pdf4me.com/pdf4me-api/edit/add-page-number-to-pdf/) **POST** `/api/v2/AddPageNumber` Adds page numbers to a PDF at a configurable position with customisable typography and numbering offset. Parameters: - `docContent` (string, Base64) — Base64-encoded PDF. Required. - `docName` (string) — Source filename. Required. - `alignment` (string) — Horizontal position: `"left"`, `"center"`, or `"right"`. Required. - `position` (string) — Vertical position: `"top"` or `"bottom"`. Required. - `margin` (number) — Distance from the page edge in points (1 pt = 0.353 mm). - `startingNumber` (integer) — The number shown on the first page. Default: 1. Set to a higher value if combining with other numbered documents. - `fontName` (string, optional) — Font family, e.g. `"Arial"`, `"Times New Roman"`. - `fontSize` (number, optional) — Font size in points. - `fontColor` (string, optional) — Hex colour code, e.g. `"#333333"`. Output: `docContent` (Base64 PDF with page numbers). ### [Sign PDF](https://docs.pdf4me.com/pdf4me-api/edit/sign-pdf/) **POST** `/api/v2/SignPdf` Places an image-based visual signature on a specified location on a PDF page. Typically used with a PNG image of a handwritten signature (transparent background recommended). This is a visual signature, not a cryptographic digital signature. Parameters: - `docContent` (string, Base64) — Base64-encoded PDF. Required. - `docName` (string) — Source filename. Required. - `signatureContent` (string, Base64) — Base64-encoded signature image (PNG recommended). Required. - `pageNumber` (integer) — Page to place the signature on (1-indexed). Required. - `x` (number) — Horizontal position in points from the left edge of the page. - `y` (number) — Vertical position in points from the bottom of the page. - `width` (number) — Signature width in points. - `height` (number) — Signature height in points. Output: `docContent` (Base64 PDF with signature placed). Use cases: adding handwritten signature images to contracts, placing signature stamps on approved documents, visual signing workflows before sending to clients, signature placement in automated document approval pipelines. ### [Add Image Stamp / Watermark](https://docs.pdf4me.com/pdf4me-api/edit/add-image-stamp-to-pdf/) **POST** `/api/v2/Stamp` Overlays an image — logo, watermark, rubber stamp, or background graphic — on one or all pages of a PDF. Supports precise positioning, opacity control, and rotation. Parameters: - `docContent` (string, Base64) — Base64-encoded PDF. Required. - `docName` (string) — Source filename. Required. - `stampContent` (string, Base64) — Base64-encoded image to overlay (PNG, JPEG, BMP). Required. - `stampType` (string) — Must be `"image"` for this endpoint variant. - `pages` (string) — Which pages to stamp: `"all"`, `"first"`, `"last"`, or a comma-separated list of page numbers e.g. `"1,3,5"`. - `opacity` (integer) — Transparency: 0 (invisible) to 100 (fully opaque). Default: 100. - `x` (number) — Horizontal position in points from the left edge. - `y` (number) — Vertical position in points from the bottom edge. - `width` (number) — Stamp width in points. - `height` (number) — Stamp height in points. - `rotation` (number, optional) — Rotation in degrees (0–360). Output: `docContent` (Base64 stamped PDF). Use cases: placing a company logo on every page of a report, adding a "PAID" or "APPROVED" rubber stamp image, overlaying a semi-transparent watermark image, placing barcode images at specific positions on pages. ### [Add Text Stamp / Text Watermark](https://docs.pdf4me.com/pdf4me-api/edit/add-text-stamp-to-pdf/) **POST** `/api/v2/Stamp` Adds a text-based watermark or stamp to PDF pages. Common text stamps include "DRAFT", "CONFIDENTIAL", "COPY", or any custom text string. Fully configurable typography, opacity, rotation, and positioning. Parameters: - `docContent` (string, Base64) — Base64-encoded PDF. Required. - `docName` (string) — Source filename. Required. - `stampType` (string) — Must be `"text"` for this endpoint variant. Required. - `text` (string) — The text to stamp, e.g. `"CONFIDENTIAL"`. Required. - `fontName` (string) — Font family, e.g. `"Arial"`, `"Helvetica"`, `"Times New Roman"`. - `fontSize` (number) — Font size in points. - `fontColor` (string) — Hex colour code, e.g. `"#FF0000"` for red. - `opacity` (integer) — 0 (invisible) to 100 (solid). Use 20–40 for a subtle diagonal watermark. - `rotation` (number) — Rotation in degrees. Use 45 for the classic diagonal watermark. - `pages` (string) — `"all"`, `"first"`, `"last"`, or specific page numbers. - `x`, `y` (number, optional) — Position override. Defaults to page centre. Output: `docContent` (Base64 PDF with text stamp). Use cases: marking draft documents with "DRAFT" during review cycles, stamping all pages of confidential documents, adding "COPY" stamp to duplicate documents, marking completed documents with "APPROVED" for workflow tracking. ### [Add Margin to PDF](https://docs.pdf4me.com/pdf4me-api/edit/add-margin-to-pdf/) **POST** `/api/v2/AddMargin` Adds whitespace margins to the edges of all PDF pages by extending the page size and pushing existing content inward. Does not crop or scale content — the page canvas grows to accommodate the margin. Parameters: - `docContent` (string, Base64) — Base64-encoded PDF. Required. - `docName` (string) — Source filename. Required. - `marginLeft` (number) — Left margin to add in millimetres. - `marginRight` (number) — Right margin to add in millimetres. - `marginTop` (number) — Top margin to add in millimetres. - `marginBottom` (number) — Bottom margin to add in millimetres. Output: `docContent` (Base64 PDF with extended margins). Use cases: adding binding margins to PDFs before printing, creating space for stamps or annotations on existing PDFs that have no margin, padding PDFs to a consistent page size across a batch, adding margin space for header/footer injection. ### [Add Attachment to PDF](https://docs.pdf4me.com/pdf4me-api/edit/add-attachment-to-pdf/) **POST** `/api/v2/AddAttachmentToPdf` Embeds a file of any type as an attachment inside a PDF document. The attachment is stored in the PDF's embedded file stream and is accessible via the "Attachments" panel in Adobe Acrobat and other PDF readers. This creates a PDF portfolio or PDF with embedded files — a feature used in e-invoicing standards like ZUGFeRD and Factur-X. Parameters: - `docContent` (string, Base64) — Base64-encoded PDF to attach the file to. Required. - `docName` (string) — Source PDF filename. Required. - `attachmentContent` (string, Base64) — Base64-encoded file to embed (any format: XML, XLSX, JSON, PDF, etc.). Required. - `attachmentName` (string) — Filename for the embedded attachment as it will appear in the PDF reader, e.g. `"invoice-data.xml"`. Required. - `attachmentDescription` (string, optional) — Human-readable description of the attachment. Output: `docContent` (Base64 PDF with embedded attachment). Use cases: embedding XML invoice data inside a PDF for ZUGFeRD/Factur-X compliance, attaching source Excel data to a PDF report, embedding supporting documentation inside contract PDFs, creating PDF portfolios with multiple embedded files, attaching audit trails to signed documents. --- ## REST API — Merge & Split **Documentation hub:** https://docs.pdf4me.com/pdf4me-api/merge-split/ Merge and split endpoints combine or divide PDF documents. All use POST to `https://api.pdf4me.com/api/v2/`. ### [Merge Multiple PDFs](https://docs.pdf4me.com/pdf4me-api/merge-split/merge-multiple-pdf-files/) **POST** `/api/v2/MergeMultiplePdfs` Combines two or more PDF documents into a single output PDF in the order specified. There is no hard limit on the number of input files, subject to the total 100MB request size limit. Parameters: - `docContents` (array of strings, Base64) — Array of Base64-encoded PDFs in the merge order. Either this or `docUrls` is required. - `docUrls` (array of strings) — Array of public HTTPS URLs to source PDFs. PDF4me fetches each in order. - `docNames` (array of strings) — Array of filenames corresponding to `docContents` or `docUrls`. Required. - `async` (boolean, optional) — Recommended when merging many large files. Output: `docContent` (Base64 merged PDF), `docName` (output filename). Request example: ```json { "docContents": ["", "", ""], "docNames": ["cover.pdf", "body.pdf", "appendix.pdf"] } ``` Use cases: assembling multi-section contract documents from individually generated parts, combining monthly report PDFs into one annual archive, merging a cover letter and CV into a single application PDF, bundling invoices for a batch submission, combining scan batches into a single document file. ### [PDF Merge Overlay](https://docs.pdf4me.com/pdf4me-api/merge-split/merge-pdf-overlay/) **POST** `/api/v2/MergeWithOverlay` Overlays one PDF on top of another page by page. Every page of the overlay PDF is transparently composited onto the corresponding page of the base PDF. Used to apply pre-designed letterheads, watermark backgrounds, or signature areas to content PDFs. Parameters: - `docContent` (string, Base64) — Base64-encoded base PDF (the content document). Required. - `docName` (string) — Base PDF filename. Required. - `overlayDocContent` (string, Base64) — Base64-encoded overlay PDF (the template, e.g. letterhead). Required. - `overlayDocName` (string) — Overlay PDF filename. Required. Output: `docContent` (Base64 composited PDF). Use cases: applying a company letterhead template to plain content PDFs, overlaying a background watermark template across all pages, stamping a pre-designed header/footer template PDF onto generated content, applying official branded form backgrounds to filled data pages. ### [Split PDF](https://docs.pdf4me.com/pdf4me-api/merge-split/split-pdf/) **POST** `/api/v2/SplitPdf` Splits a single PDF into multiple output PDFs using one of three split modes. Returns either an array of individual PDFs or a single ZIP archive containing all split files. Parameters: - `docContent` (string, Base64) — Base64-encoded PDF to split. Required. - `docName` (string) — Source filename. Required. - `splitType` (string) — Split mode. Required. Options: - `"splitAtPage"` — Split at specific page numbers. Provide comma-separated page numbers in `splitValue`, e.g. `"3,7,12"` splits before pages 3, 7, and 12. - `"splitByFixedCount"` — Split every N pages. Provide the page count in `splitValue`, e.g. `"1"` creates one-page PDFs from each page. - `"splitByRange"` — Extract a specific range. Provide start-end in `splitValue`, e.g. `"2-5"`. - `splitValue` (string) — The split parameter value corresponding to `splitType`. - `outputAsZip` (boolean, optional) — `true` returns a ZIP archive of all output PDFs. `false` returns an array. Default: `false`. Output: array of `docContent` (Base64 PDFs) or a single `docContent` (Base64 ZIP archive if `outputAsZip: true`). Use cases: splitting a 100-page invoice batch into 100 individual one-page PDFs, extracting chapters from a merged report by split-at-page, creating fixed-size page bundles for archiving, splitting a PDF book into chapters at known page break points. ### [Split PDF by Barcode](https://docs.pdf4me.com/pdf4me-api/merge-split/split-by-barcode/) **POST** `/api/v2/SplitPdfByBarcode_old` Scans every page of a PDF for barcodes and splits the document at pages where a matching barcode is found. The barcode page acts as a separator between documents. Supports all major barcode types including QR Code, Code 128, Code 39, Data Matrix, PDF417, and EAN. Parameters: - `docContent` (string, Base64) — Base64-encoded PDF. Required. - `docName` (string) — Source filename. Required. - `barcodeType` (string) — Barcode symbology to look for: `"QRCode"`, `"Code128"`, `"Code39"`, `"DataMatrix"`, `"Pdf417"`, `"Ean13"`, etc. Required. - `splitValue` (string, optional) — Specific barcode value to split on. If empty, splits at every detected barcode of the given type. - `includeSeparatorPage` (boolean, optional) — Whether to include the barcode page in the output. Default: `false` (separator page is discarded). - `outputAsZip` (boolean, optional) — Return results as a ZIP archive. Default: `false`. Output: array of split PDFs (Base64) or ZIP archive. Use cases: processing office scan batches where barcode separator sheets are inserted between documents, auto-splitting merged patient file scans, separating merged invoice scans by barcode cover sheet, batch document ingestion pipelines in logistics and healthcare. ### [Split PDF by Text](https://docs.pdf4me.com/pdf4me-api/merge-split/split-pdf-by-text/) **POST** `/api/v2/SplitByText` Splits a PDF at pages where a specified text string appears. The engine performs full-text search across all pages and uses matching pages as split boundaries. Useful for documents merged with known text headers like "Invoice Number:", "Patient Name:", or "--- NEW DOCUMENT ---". Parameters: - `docContent` (string, Base64) — Base64-encoded PDF. Required. - `docName` (string) — Source filename. Required. - `splitText` (string) — The text string to search for. Required. Case sensitivity depends on `caseSensitive`. - `caseSensitive` (boolean, optional) — `true` for exact case match, `false` for case-insensitive. Default: `false`. - `includeSeparatorPage` (boolean, optional) — Include the matching page in output. Default: `true`. - `outputAsZip` (boolean, optional) — Return results as ZIP. Default: `false`. Output: array of split PDFs or ZIP archive. Use cases: splitting merged patient records where each record starts with "Patient Name:", separating a combined invoice PDF where each invoice starts with "Invoice Number:", splitting legal bundles at "EXHIBIT" markers, processing form batches where each form starts with a known title text. ### [Split PDF by Swiss QR](https://docs.pdf4me.com/pdf4me-api/merge-split/split-pdf-by-swiss-qr/) **POST** `/api/v2/SplitPdfByBarcode` Detects Swiss QR bill payment sections in a PDF and splits the document at each QR bill boundary. Returns one PDF per Swiss QR invoice detected. Specifically designed for the SIX Group Swiss QR payment standard used on Swiss invoices since 2020. Parameters: - `docContent` (string, Base64) — Base64-encoded PDF containing multiple Swiss QR invoices. Required. - `docName` (string) — Source filename. Required. - `outputAsZip` (boolean, optional) — Return all split invoices as a ZIP archive. Default: `false`. Output: array of individual invoice PDFs (Base64) or ZIP archive. Use cases: splitting batch-printed Swiss QR invoice runs into individual invoice PDFs for per-customer distribution, separating multi-invoice scans from accounting software exports, processing Swiss QR invoice batches from ERP systems into individual document records. --- ## REST API — Barcode **Documentation hub:** https://docs.pdf4me.com/pdf4me-api/barcode/ Barcode endpoints create standalone barcode images, embed barcodes into PDFs, read barcodes from documents, and generate Swiss QR payment bills. Supported symbologies include QR Code, Code 128, Code 39, EAN-13, EAN-8, UPC-A, UPC-E, Data Matrix, PDF417, Aztec, ITF-14, Codabar, and Swiss QR. ### [Add Barcode to PDF](https://docs.pdf4me.com/pdf4me-api/barcode/add-barcode-to-pdf/) **POST** `/api/v2/AddBarcodeToPdf` Generates a barcode from a value and embeds it at a precise location on a specified page of an existing PDF. The barcode is rendered as a vector element in the PDF for sharp output at any zoom level. Parameters: - `docContent` (string, Base64) — Base64-encoded PDF. Required. - `docName` (string) — Source filename. Required. - `barcodeType` (string) — Barcode symbology. Required. Options: `"QRCode"`, `"Code128"`, `"Code39"`, `"Ean13"`, `"Ean8"`, `"UpcA"`, `"DataMatrix"`, `"Pdf417"`, `"Aztec"`, `"Itf14"`, `"Codabar"`, `"SwissQr"`. - `barcodeValue` (string) — The data to encode in the barcode, e.g. a URL, tracking number, product code, or invoice reference. Required. - `pageNumber` (integer) — Page to place the barcode on (1-indexed). Required. - `x` (number) — Horizontal position in points from the left edge of the page. - `y` (number) — Vertical position in points from the bottom edge of the page. - `width` (number) — Barcode width in points. - `height` (number) — Barcode height in points. - `showBarcodeText` (boolean, optional) — Show the human-readable value below 1D barcodes. Default: `true`. Output: `docContent` (Base64 PDF with barcode embedded). Use cases: adding package tracking QR codes to shipping labels generated as PDFs, embedding product UPC barcodes on label PDFs, placing Swiss QR payment codes on invoices, adding Code 128 barcodes to batch processing separator pages, embedding serial number barcodes on certificates. ### [Read Barcode from PDF](https://docs.pdf4me.com/pdf4me-api/barcode/read-barcode-from-pdf/) **POST** `/api/v2/ReadBarcodeFromPdf` Scans all pages of a PDF and decodes every barcode found. Returns a structured JSON list of all detected barcodes with their type, decoded value, page location, and bounding box coordinates. Parameters: - `docContent` (string, Base64) — Base64-encoded PDF. Required. - `docName` (string) — Source filename. Required. - `barcodeFilter` (string, optional) — Filter results to a specific barcode type, e.g. `"QRCode"`. Leave empty to return all barcode types found. - `pageFilter` (integer, optional) — Scan only a specific page number. Leave empty to scan all pages. Output: JSON array of barcode result objects. Each object contains: - `barcodeType` (string) — Symbology detected, e.g. `"QRCode"`, `"Code128"` - `barcodeValue` (string) — Decoded barcode data - `pageNumber` (integer) — Page the barcode was found on - `x`, `y`, `width`, `height` (numbers) — Bounding box in points Use cases: extracting tracking codes from received shipping PDFs, reading Swiss QR payment data from scanned invoices, verifying barcode presence and value in generated documents, extracting product codes from PDF catalogues, building barcode-based document routing systems. ### [Create Swiss QR Bill](https://docs.pdf4me.com/pdf4me-api/barcode/create-swissqr-bill/) **POST** `/api/v2/CreateSwissQrBill` Generates a complete, standards-compliant Swiss QR payment bill as a PDF page or image. Conforms to the SIX Group Swiss Payment Standards for QR invoices, which are mandatory for Swiss invoices since 2022. The output includes the QR code section, amount box, and payment details in the standardised layout. Parameters: - `creditorName` (string) — Payee name. Required. - `creditorAddress` (string) — Payee street address. Required. - `creditorZip` (string) — Payee postal code. Required. - `creditorCity` (string) — Payee city. Required. - `creditorCountry` (string) — ISO 3166-1 alpha-2 country code, must be `"CH"` for Swiss QR. Required. - `creditorIban` (string) — Payee IBAN in CH or LI format (21 characters). Required. - `amount` (number) — Payment amount. Use 0 for "amount open" bills. - `currency` (string) — `"CHF"` or `"EUR"`. Required. - `debtorName` (string, optional) — Payer name (shown in debtor section). - `debtorAddress`, `debtorZip`, `debtorCity`, `debtorCountry` (string, optional) — Payer address. - `referenceType` (string) — Payment reference type: `"QRR"` (QR reference, 27 digits), `"SCOR"` (Creditor Reference, ISO 11649), or `"NON"` (no reference). - `reference` (string, optional) — Reference number matching the `referenceType` format. - `message` (string, optional) — Unstructured payment message (max 140 characters). - `outputFormat` (string, optional) — `"pdf"` (A6 landscape bill section) or `"png"`. Default: `"pdf"`. Output: `docContent` (Base64 PDF page or PNG of the Swiss QR bill section). Use cases: generating Swiss QR payment slips to append to invoices, embedding QR bill data on invoice PDFs for Swiss clients, building Swiss e-invoicing pipelines from ERP data, generating payment instructions for Swiss utility or subscription bills. ### [Create Barcode Image](https://docs.pdf4me.com/pdf4me-api/barcode/create-barcode/) **POST** `/api/v2/CreateBarcode` Generates a standalone barcode graphic as a PNG, SVG, or JPEG image without requiring a PDF. The barcode image can be used in web apps, emails, labels, or imported into other documents. Parameters: - `barcodeType` (string) — Barcode symbology. Required. See full list in Add Barcode to PDF. - `barcodeValue` (string) — Data to encode. Required. - `outputFormat` (string) — Output image format: `"png"`, `"svg"`, `"jpeg"`. Default: `"png"`. - `width` (integer, optional) — Image width in pixels. - `height` (integer, optional) — Image height in pixels. - `foregroundColor` (string, optional) — Hex colour for the barcode bars, e.g. `"#000000"`. - `backgroundColor` (string, optional) — Hex colour for the background, e.g. `"#FFFFFF"`. Use `"transparent"` for PNG with transparent background. - `showText` (boolean, optional) — Show human-readable text below 1D barcodes. Output: `docContent` (Base64 image in the requested format). Use cases: generating QR codes for URLs, contact cards (vCard), Wi-Fi credentials, or payment links, creating product barcode graphics for e-commerce listings, generating barcode images for embedding in email templates, producing SVG barcodes for web pages or print-ready graphics. ### [Read Swiss QR Code](https://docs.pdf4me.com/pdf4me-api/barcode/read-swissqr-code/) **POST** `/api/v2/ReadSwissQrCode` Decodes a Swiss QR payment code from a PDF or image and returns the structured payment data as a JSON object — including creditor IBAN, amount, currency, reference number, and debtor information. Parameters: - `docContent` (string, Base64) — Base64-encoded PDF or image containing a Swiss QR code. Required. - `docName` (string) — Source filename. Required. Output: JSON object with all Swiss QR payment fields: `creditorIban`, `creditorName`, `amount`, `currency`, `referenceType`, `reference`, `message`, `debtorName`, and full address fields for both creditor and debtor. Use cases: automatically extracting payment data from received Swiss QR invoices for accounts payable processing, validating Swiss QR code content in generated invoices, feeding Swiss QR data into ERP or accounting systems without manual entry. --- ## REST API — Forms **Documentation hub:** https://docs.pdf4me.com/pdf4me-api/forms/ Forms endpoints work with interactive AcroForm PDFs — filling existing form fields with data, or adding new interactive form fields to any PDF. ### [Fill a PDF Form](https://docs.pdf4me.com/pdf4me-api/forms/fill-a-pdf-form/) **POST** `/api/v2/FillForm` Programmatically populates all interactive AcroForm fields in a PDF using a JSON data object. Supports text fields, multiline text areas, checkboxes, radio button groups, dropdown lists, and date fields. Field names in the JSON must exactly match the field names in the PDF (case-sensitive). Parameters: - `docContent` (string, Base64) — Base64-encoded PDF with AcroForm fields. Required. - `docName` (string) — Source filename. Required. - `formData` (object) — JSON key-value object mapping PDF field names to their values. Required. - Text fields: `"fieldName": "value text"` - Checkboxes: `"checkboxField": true` or `false` - Radio buttons: `"radioGroup": "optionValue"` - Dropdowns: `"dropdownField": "selectedOption"` - `flatten` (boolean, optional) — If `true`, flattens form fields after filling (form becomes static, non-editable). Recommended for final documents. Default: `false`. Output: `docContent` (Base64 filled PDF). Request example: ```json { "docContent": "", "docName": "application.pdf", "formData": { "FirstName": "John", "LastName": "Smith", "Email": "john@example.com", "AgreeToTerms": true, "PlanType": "Business" }, "flatten": true } ``` Use cases: auto-filling insurance application forms with customer data from a CRM, populating government form templates with applicant data, generating pre-filled PDF applications for loan or visa processes, mass-producing personalised filled forms from a data spreadsheet, completing tax forms programmatically from accounting data. ### [Add Form Fields to PDF](https://docs.pdf4me.com/pdf4me-api/forms/add-form-fields-to-pdf/) **POST** `/api/v2/AddFormFieldToPdf` Adds new interactive AcroForm fields to an existing PDF at specified coordinate positions. Converts a static PDF into an interactive fillable form. Supports all standard AcroForm field types. Parameters: - `docContent` (string, Base64) — Base64-encoded PDF to add fields to. Required. - `docName` (string) — Source filename. Required. - `fields` (array of objects) — Array of field definition objects. Each object contains: - `fieldType` (string) — Field type: `"text"`, `"checkbox"`, `"radio"`, `"dropdown"`, `"listbox"`, `"signature"`, `"button"`. Required. - `fieldName` (string) — Unique field name (used as key when filling). Required. - `pageNumber` (integer) — Page to place the field (1-indexed). Required. - `x` (number) — Left edge position in points from left of page. - `y` (number) — Bottom edge position in points from bottom of page. - `width` (number) — Field width in points. - `height` (number) — Field height in points. - `defaultValue` (string, optional) — Pre-filled default value. - `options` (array, optional) — For dropdowns and listboxes: list of option strings. - `isRequired` (boolean, optional) — Mark field as required for form validation. - `tooltip` (string, optional) — Tooltip text shown on hover. Output: `docContent` (Base64 PDF with new form fields added). Use cases: converting a scanned form image to an interactive fillable PDF by adding fields over the image, adding signature fields to contract PDFs at the signing location, creating a fillable version of a print-only form, adding data entry fields to static report templates for manual data annotation. --- ## REST API — Extract & AI **Documentation hub:** https://docs.pdf4me.com/pdf4me-api/extract/ Extract endpoints pull structured data, text, tables, form values, and embedded resources out of PDF documents. AI-powered endpoints use machine learning models for document classification and schema-based data extraction. ### [Classify Document](https://docs.pdf4me.com/pdf4me-api/extract/classify-document/) **POST** `/api/v2/ClassifyDocument` Uses a trained AI model to automatically identify the document type from a PDF or image file. Returns the most likely document class with a confidence score, plus a ranked list of all predicted classes. Does not require any configuration — send the document, receive the classification. Parameters: - `docContent` (string, Base64) — Base64-encoded document (PDF, JPEG, PNG, TIFF). Required. - `docName` (string) — Source filename with extension. Required. Output: - `documentType` (string) — Predicted document class, e.g. `"Invoice"`, `"Contract"`, `"Receipt"`, `"BankStatement"`, `"PayStub"`, `"TaxForm"`, `"HealthCard"`, `"IdCard"`, `"Passport"`, `"MortgageDocument"`, `"MarriageCertificate"`. - `confidence` (number) — Confidence score for the top prediction, range 0–1. - `allPredictions` (array) — Ranked list of all predicted classes with individual confidence scores. Use cases: auto-routing incoming documents to the correct processing pipeline (invoices → AP system, contracts → legal review), filtering mixed document uploads by type, validating that an uploaded file matches an expected document type, building intelligent document sorting systems without manual classification, integrating AI document triage into RPA workflows. ### [Parse Document (AI Data Extraction)](https://docs.pdf4me.com/pdf4me-api/extract/parse-document/) **POST** `/api/v2/ParseDocument` Schema-driven AI data extraction. You define the fields you want to extract (name, data type, description) as a JSON schema, and PDF4me's AI model locates and extracts those fields from the document. Works on any structured document type — invoices, contracts, receipts, bank statements, pay stubs, and more — without per-template configuration. Parameters: - `docContent` (string, Base64) — Base64-encoded document. Required. - `docName` (string) — Source filename. Required. - `parseInfo` (string) — JSON string defining extraction schema. Each entry includes: - `name` (string) — Field name in the output. - `type` (string) — Data type: `"string"`, `"number"`, `"date"`, `"boolean"`, `"array"`. - `description` (string) — Natural language description of what to extract, e.g. `"Total invoice amount including tax"`. Output: JSON object with keys matching the `parseInfo` field names and extracted values. Request example: ```json { "docContent": "", "docName": "invoice.pdf", "parseInfo": "[{\"name\":\"invoiceNumber\",\"type\":\"string\",\"description\":\"Invoice number or ID\"},{\"name\":\"totalAmount\",\"type\":\"number\",\"description\":\"Total amount due including tax\"},{\"name\":\"invoiceDate\",\"type\":\"date\",\"description\":\"Invoice issue date\"},{\"name\":\"vendorName\",\"type\":\"string\",\"description\":\"Name of the supplier or vendor\"}]" } ``` Use cases: automated invoice data capture for accounts payable, extracting contract parties, dates, and key terms for contract management, pulling receipt totals and merchant names for expense management, extracting bank statement transactions for reconciliation, building no-template document-to-data pipelines. ### [Extract Form Data from PDF](https://docs.pdf4me.com/pdf4me-api/extract/extract-form-data-from-pdf/) **POST** `/api/v2/ExtractFormData` Reads all submitted field values from a completed interactive AcroForm PDF. Returns every form field's name and its submitted value as a structured JSON object. Works on any PDF with AcroForm fields — regardless of whether the fields were filled by a user or programmatically. Parameters: - `docContent` (string, Base64) — Base64-encoded filled PDF form. Required. - `docName` (string) — Source filename. Required. Output: `formData` (JSON object) — key-value pairs where keys are field names and values are submitted data. Checkboxes return boolean values; text fields return strings; dropdowns return the selected option string. Use cases: extracting submitted application form data for database storage, reading completed PDF survey responses, processing received filled PDF forms in automation workflows, capturing insurance claim form data, integrating PDF form submissions with CRM or ERP systems. ### [Extract Text by Expression](https://docs.pdf4me.com/pdf4me-api/extract/extract-text-by-expression/) **POST** `/api/v2/ExtractTextByExpression` Extracts specific text values from a PDF using pattern-matching rules. Rules can use keyword anchors (find text between two known strings) or regular expressions. Supports multi-page documents and can target specific pages. Parameters: - `docContent` (string, Base64) — Base64-encoded PDF. Required. - `docName` (string) — Source filename. Required. - `expressions` (array of objects) — Extraction rules. Each object contains: - `expressionType` (string) — `"between"` (text between two anchor strings) or `"regex"` (regular expression pattern). - `startText` (string) — Left anchor text (for `"between"` type). - `endText` (string) — Right anchor text (for `"between"` type). - `pattern` (string) — Regex pattern (for `"regex"` type). - `pageNumber` (integer, optional) — Target a specific page. Omit to search all pages. - `extractionName` (string) — Label for this extraction in the output. Output: JSON array — one object per expression match, containing `extractionName`, `extractedText`, `pageNumber`, `x`, `y` (position). Use cases: extracting invoice totals using anchor text ("Total Due: " → end of line), pulling reference numbers using a regex pattern, extracting date values from known positions in form-like documents, building lightweight data extraction without AI for documents with predictable structure. ### [Extract Table from PDF](https://docs.pdf4me.com/pdf4me-api/extract/extract-table-from-pdf/) **POST** `/api/v2/ExtractTableFromPdf` Automatically detects and extracts tabular data from PDF pages and returns it as structured JSON arrays or CSV text. The extraction engine handles bordered tables, borderless tables, multi-column layouts, header rows, and merged cells. Parameters: - `docContent` (string, Base64) — Base64-encoded PDF. Required. - `docName` (string) — Source filename. Required. - `pageNumber` (integer or string, optional) — Specific page number (1-indexed) or `"all"` for all pages. Default: `"all"`. - `outputFormat` (string, optional) — `"json"` (array of row arrays) or `"csv"` (comma-separated text). Default: `"json"`. Output: structured table data. JSON format returns an array of tables; each table is an array of rows; each row is an array of cell strings. CSV format returns a plain text string. Use cases: extracting line items from supplier invoice PDFs for automated AP entry, pulling data from PDF financial reports into spreadsheets, converting PDF price lists to structured product data, extracting table data from regulatory filings, processing government data published in PDF tables. ### [Extract Attachment from PDF](https://docs.pdf4me.com/pdf4me-api/extract/extract-attachment-from-pdf/) **POST** `/api/v2/ExtractAttachmentFromPdf` Extracts files that have been embedded as attachments inside a PDF (PDF portfolio / PDF with embedded file streams). Returns each attachment as a separate Base64-encoded file with its original filename. Parameters: - `docContent` (string, Base64) — Base64-encoded PDF with embedded attachments. Required. - `docName` (string) — Source filename. Required. Output: array of attachment objects, each containing `attachmentName` (original filename) and `attachmentContent` (Base64 file content). Use cases: extracting XML invoice data embedded in ZUGFeRD/Factur-X PDFs for ERP processing, unpacking PDF portfolios, retrieving supporting documents embedded in contract PDFs, extracting structured data files embedded in regulatory submission PDFs. ### [Extract Resources from PDF](https://docs.pdf4me.com/pdf4me-api/extract/extract-resources/) **POST** `/api/v2/ExtractResources` Extracts all embedded resources from a PDF — including images, fonts, raw text content, and document metadata. Each resource is returned as a separate Base64-encoded item with type and name information. Parameters: - `docContent` (string, Base64) — Base64-encoded PDF. Required. - `docName` (string) — Source filename. Required. - `resourceType` (string, optional) — Filter by resource type: `"images"`, `"fonts"`, `"text"`, `"all"`. Default: `"all"`. Output: array of resource objects with `resourceType`, `resourceName`, and `resourceContent` (Base64). Use cases: extracting all images from a PDF catalogue for reuse, pulling embedded fonts for compliance checking, extracting text content for indexing or search, auditing embedded resources in received PDFs. --- ## REST API — Find & Search **Documentation hub:** https://docs.pdf4me.com/pdf4me-api/find-search/ ### [OCR — Convert PDF to Searchable / Editable](https://docs.pdf4me.com/pdf4me-api/find-search/convert-pdf-to-editable-pdf-using-ocr/) **POST** `/api/v2/PdfOcr` Applies Optical Character Recognition (OCR) to image-based or scanned PDFs, making them text-selectable, searchable, and copy-paste enabled. Supports over 100 languages. Can output either a searchable PDF (invisible text layer over the original image) or a fully editable PDF (text extracted and placed as selectable text objects). Parameters: - `docContent` (string, Base64) — Base64-encoded scanned or image-based PDF. Required. - `docName` (string) — Source filename. Required. - `language` (string) — OCR language code: `"eng"` (English), `"deu"` (German), `"fra"` (French), `"spa"` (Spanish), `"ita"` (Italian), `"por"` (Portuguese), `"chi_sim"` (Simplified Chinese), `"ara"` (Arabic), and 100+ others. Default: `"eng"`. - `outputType` (string, optional) — `"searchablePdf"` (add invisible text layer, preserves original appearance) or `"editablePdf"` (replaces image with editable text). Default: `"searchablePdf"`. - `async` (boolean, optional) — Recommended for multi-page scanned documents. Output: `docContent` (Base64 OCR-processed PDF). Use cases: making scanned legal contracts text-searchable and copy-paste enabled, digitising paper archives to searchable PDF format, enabling full-text indexing of scanned document libraries, allowing extraction of text from scanned PDFs for downstream data processing, enabling accessibility tools (screen readers) on scanned PDFs. ### [Find and Replace Text in PDF](https://docs.pdf4me.com/pdf4me-api/find-search/find-and-replace-text/) **POST** `/api/v2/FindAndReplace` Searches for text patterns within a PDF and replaces matching text with new content. Supports exact match and case-insensitive matching. Can target specific pages or all pages. The replacement is applied to the PDF's text content layer. Parameters: - `docContent` (string, Base64) — Base64-encoded PDF. Required. - `docName` (string) — Source filename. Required. - `findReplaceList` (array of objects) — List of find-replace pairs. Each object: - `findText` (string) — Text to search for. - `replaceText` (string) — Replacement text. - `caseSensitive` (boolean, optional) — Default: `false`. - `pageFrom` (integer, optional) — Start page for the replacement operation. - `pageTo` (integer, optional) — End page for the replacement operation. Output: `docContent` (Base64 PDF with replacements applied). Use cases: updating a template PDF with customer-specific values without using the template engine, replacing placeholder text in generated PDFs, correcting known text errors across multiple pages, personalising boilerplate PDFs by replacing standard text blocks with custom content. --- ## REST API — Generate (Document from Template) **Documentation hub:** https://docs.pdf4me.com/pdf4me-api/generate/ Generate endpoints use Word (.docx) or HTML templates combined with JSON data to produce PDF or Office document output. This is PDF4me's document generation / mail merge engine — used for invoices, contracts, certificates, letters, and any structured document that follows a repeating template pattern. ### [Generate Document — Single Record](https://docs.pdf4me.com/pdf4me-api/generate/generate-document-single/) **POST** `/api/v2/GenerateDocument` Merges a single JSON data record with a Word or HTML template to produce one output document. The template file uses `<<[fieldName]>>` merge field syntax. Supports variable substitution, conditional sections, dynamic tables driven by JSON arrays, embedded images, HTML blocks, and formatting transformations. Parameters: - `docContent` (string, Base64) — Base64-encoded Word (.docx) or HTML template file. Required. - `docName` (string) — Template filename with extension, e.g. `"invoice-template.docx"`. Required. - `mergeData` (string) — JSON string containing the data object to merge into the template. Required. - `outputType` (string) — Output format: `"pdf"` (default), `"docx"`, `"xlsx"`, `"html"`. Required. - `async` (boolean, optional) — Recommended for complex templates or large image data. Output: `docContent` (Base64 generated document in the requested format), `docName` (output filename). Template syntax quick reference: - Simple variable: `<<[firstName]>>` → replaced with the `firstName` value from JSON - Conditional block: `<>Premium content here<>` - Table row repeat: `<><<[item.name]>> — <<[item.price]>><>` - Image: Insert an image placeholder in Word, bind it to a base64 field name - Formatting: `<<[amount]:"C2">>` (currency), `<<[date]:"dd/MM/yyyy">>` (date format), `<<[name]:upper>>` (uppercase) Use cases: generating personalised contract PDFs from CRM data, producing PDF invoices from order JSON data, creating certificates with recipient-specific text and signatures, generating offer letters with candidate-specific details, producing personalised welcome letters for mass onboarding. ### [Generate Documents — Bulk (Multiple Records)](https://docs.pdf4me.com/pdf4me-api/generate/generate-documents-multiple/) **POST** `/api/v2/GenerateDocuments` Batch document generation — merges one template with an array of JSON data records and returns one output document per record. All output files are bundled in a ZIP archive. Highly efficient for generating hundreds or thousands of personalised documents in a single API call. Parameters: - `docContent` (string, Base64) — Base64-encoded Word or HTML template. Required. - `docName` (string) — Template filename. Required. - `mergeDataList` (string) — JSON string containing an array of data objects — one per document to generate. Required. - `outputType` (string) — Output format for all generated documents: `"pdf"`, `"docx"`, `"html"`. Required. - `async` (boolean, optional) — Strongly recommended for bulk operations. Returns a `jobId` to poll. Output: `docContent` (Base64 ZIP archive containing one generated document per data record). Use cases: generating 500 personalised invoice PDFs from a month's orders in one call, producing bulk certificate PDFs for a training programme from attendee data, generating personalised offer letters for all candidates in a hiring batch, mass-producing customised contract PDFs for a portfolio of clients, bulk statement generation from account data. ### [Replace Text with Image in Word](https://docs.pdf4me.com/pdf4me-api/generate/replace-text-with-image-in-word/) **POST** `/api/v2/ReplaceTextWithImageInWord` Finds a specific text placeholder in a Word document and replaces it with an inline image at the same position. The image size matches the placeholder's bounding area. Parameters: - `docContent` (string, Base64) — Base64-encoded DOCX. Required. - `docName` (string) — Source filename. Required. - `findText` (string) — The placeholder text to replace, e.g. `"[SIGNATURE_HERE]"`. Required. - `imageContent` (string, Base64) — Base64-encoded image to insert. Required. - `imageWidth` (number, optional) — Width in cm for the inserted image. - `imageHeight` (number, optional) — Height in cm for the inserted image. Output: `docContent` (Base64 DOCX with image replacing the placeholder text). Use cases: inserting dynamic signature images into Word contract templates at marked positions, adding dynamic charts or graphs generated at runtime into Word report templates, replacing placeholder text with product images in catalogue templates. ### [Enable Tracking Changes in Word](https://docs.pdf4me.com/pdf4me-api/generate/enable-tracking-changes-in-word/) **POST** `/api/v2/EnableTrackingChanges` Enables the "Track Changes" feature in a Word document so that subsequent edits made to the document will be recorded as tracked changes visible in Word's revision history. Parameters: - `docContent` (string, Base64) — Base64-encoded DOCX. Required. - `docName` (string) — Source filename. Required. Output: `docContent` (Base64 DOCX with Track Changes enabled). ### [Get Tracking Changes from Word](https://docs.pdf4me.com/pdf4me-api/generate/get-tracking-changes-in-word/) **POST** `/api/v2/GetTrackingChanges` Extracts all tracked changes from a Word document and returns them as a structured JSON list — including the change type (insertion, deletion, formatting), changed text, author, and timestamp. Parameters: - `docContent` (string, Base64) — Base64-encoded DOCX with tracked changes. Required. - `docName` (string) — Source filename. Required. Output: JSON array of tracked change objects with `changeType`, `originalText`, `revisedText`, `author`, `date`. --- ## REST API — Security **Documentation hub:** https://docs.pdf4me.com/pdf4me-api/security/ Security endpoints apply or remove password protection and permission restrictions on PDF documents. ### [Protect PDF](https://docs.pdf4me.com/pdf4me-api/security/protect-document/) **POST** `/api/v2/ProtectDocument` Encrypts a PDF with AES password protection and applies granular permission restrictions. Supports two password levels: a user password (required to open/view the document) and an owner password (required to change the security settings). Each individual permission can be independently allowed or denied. Parameters: - `docContent` (string, Base64) — Base64-encoded PDF to protect. Required. - `docName` (string) — Source filename. Required. - `userPassword` (string, optional) — Password required to open and view the PDF. If omitted, the PDF opens without a password but permission restrictions still apply. - `ownerPassword` (string, optional) — Password required to change security settings or override permissions. Should be different from the user password. - `encryptionLevel` (string) — Encryption algorithm: `"aes128"` (128-bit AES, compatible with Acrobat 7+) or `"aes256"` (256-bit AES, compatible with Acrobat X+, stronger). Required. - `allowPrinting` (boolean) — Allow document printing. Default: `true`. - `allowHighQualityPrinting` (boolean) — Allow high-resolution printing. Default: `true`. - `allowCopying` (boolean) — Allow text and image copying from the document. Default: `true`. - `allowEditing` (boolean) — Allow editing the document content. Default: `false`. - `allowFillingForms` (boolean) — Allow filling interactive form fields. Default: `true`. - `allowExtractingPages` (boolean) — Allow page extraction. Default: `false`. - `allowAccessibilityTools` (boolean) — Allow assistive technology access. Default: `true`. Output: `docContent` (Base64 encrypted PDF). Use cases: protecting confidential financial reports with a password for email distribution, restricting editing of contract PDFs while allowing printing, preventing text copying from proprietary documents, applying permission-only protection (no open password) to restrict what recipients can do with the document, securing HR documents before sending to external parties. ### [Unlock PDF](https://docs.pdf4me.com/pdf4me-api/security/unlock-pdf/) **POST** `/api/v2/UnlockPdf` Removes password protection from a PDF. Requires the owner password (or user password if no owner password is set). Once unlocked, the PDF can be processed by any other PDF4me endpoint without supplying credentials. Parameters: - `docContent` (string, Base64) — Base64-encoded password-protected PDF. Required. - `docName` (string) — Source filename. Required. - `password` (string) — The owner password (preferred) or user password. Required. Output: `docContent` (Base64 unlocked, unprotected PDF). Use cases: removing protection from PDFs before further processing in an automation pipeline (compress, merge, OCR), unlocking internally produced PDFs for editing, integrating unlock as a pre-processing step in document workflows, removing redundant protection from archived documents. --- ## REST API — Optimize **Documentation hub:** https://docs.pdf4me.com/pdf4me-api/optimize/ ### [Compress PDF](https://docs.pdf4me.com/pdf4me-api/optimize/compress-pdf/) **POST** `/api/v2/CompressPdf` Reduces PDF file size through multiple optimisation techniques: image downsampling and recompression, removal of duplicate embedded resources, font subsetting, PDF stream compression, and elimination of unused metadata. Multiple compression profiles are available to balance output quality against file size reduction. Parameters: - `docContent` (string, Base64) — Base64-encoded PDF. Required. - `docName` (string) — Source filename. Required. - `compressionProfile` (string) — Compression strategy. Options: - `"Default"` — Balanced compression for general use. Recommended starting point. - `"Max"` — Maximum compression, lowest file size. May reduce image quality significantly. - `"Web"` — Optimised for web delivery: 72–96 DPI images, linearized for fast web view. - `"Print"` — Print-quality output: 150 DPI images, lossless compression. Maintains print quality. - `"WebMax"` — Aggressive web optimisation, smaller than "Web". - `"PrintMax"` — Maximum print compression while preserving colour accuracy. - `"PrintGray"` — Converts to grayscale + print compression. Maximum size reduction for print-only content. - `"Compress"` — Standard lossless compression without image quality reduction. - `"CompressMax"` — Maximum lossless + lossy compression combined. - `async` (boolean, optional) — Recommended for files above 20MB. Output: `docContent` (Base64 compressed PDF), `originalFileSize` (integer, bytes), `compressedFileSize` (integer, bytes), `compressionRatio` (number, percentage reduction). Use cases: reducing PDF email attachments below size limits (e.g., 10MB email cap), compressing PDFs before cloud storage to reduce storage costs, optimising PDFs for web download with smaller file sizes, compressing scanned document archives, reducing bandwidth usage when serving PDFs via CDN. --- ## REST API — Organize **Documentation hub:** https://docs.pdf4me.com/pdf4me-api/organize/ Organize endpoints manipulate the page structure of PDF documents — extracting, deleting, rotating, and rearranging pages. ### [Extract Pages](https://docs.pdf4me.com/pdf4me-api/organize/extract-pages/) **POST** `/api/v2/ExtractPages` Extracts a specific subset of pages from a PDF to create a new smaller PDF containing only those pages. Preserves all PDF features (bookmarks, annotations, form fields) on the extracted pages. Parameters: - `docContent` (string, Base64) — Base64-encoded source PDF. Required. - `docName` (string) — Source filename. Required. - `pageSequence` (string) — Pages to extract, specified as: - Single page: `"3"` (extracts page 3 only) - Range: `"2-6"` (extracts pages 2 through 6) - List: `"1,3,5,7"` (extracts specific pages) - Combined: `"1,3-5,9"` (list and range mixed) - `async` (boolean, optional) — For large source PDFs. Output: `docContent` (Base64 PDF containing only the extracted pages). Use cases: extracting the signature page from a contract, pulling specific chapters from a large PDF manual, creating a summary PDF from selected pages of a report, extracting appendix pages from a legal document, separating cover pages from multi-document PDFs. ### [Delete Pages](https://docs.pdf4me.com/pdf4me-api/organize/delete-pages/) **POST** `/api/v2/DeletePages` Removes specified pages from a PDF and returns the document with those pages permanently deleted. Parameters: - `docContent` (string, Base64) — Base64-encoded PDF. Required. - `docName` (string) — Source filename. Required. - `pageSequence` (string) — Pages to delete, using the same syntax as Extract Pages: single page, range, or comma-separated list. Output: `docContent` (Base64 PDF with specified pages removed). Use cases: removing blank pages from scanned documents, deleting cover or separator pages before merging, removing confidential appendix pages before external distribution, trimming trailing empty pages from generated PDFs. ### [Delete Blank Pages](https://docs.pdf4me.com/pdf4me-api/organize/delete-blank-pages-from-pdf/) **POST** `/api/v2/DeleteBlankPages` Automatically detects and removes blank or near-blank pages from a PDF. Useful for cleaning up scanned document batches where the scanner inserts blank pages between documents or at duplex-scan boundaries. Parameters: - `docContent` (string, Base64) — Base64-encoded PDF. Required. - `docName` (string) — Source filename. Required. - `blankPageThreshold` (number, optional) — Content density threshold (0–100) below which a page is considered blank. Higher value = more aggressive blank detection. Default: `5`. Output: `docContent` (Base64 PDF with blank pages removed). ### [Rotate Document](https://docs.pdf4me.com/pdf4me-api/organize/rotate-document/) **POST** `/api/v2/RotateDocument` Rotates all pages in a PDF by a specified angle. The rotation is applied to the page orientation in the PDF structure — content is permanently rotated, not just displayed rotated. Parameters: - `docContent` (string, Base64) — Base64-encoded PDF. Required. - `docName` (string) — Source filename. Required. - `rotationAngle` (integer) — Degrees of clockwise rotation: `90`, `180`, or `270`. Required. Output: `docContent` (Base64 rotated PDF). Use cases: correcting scanned documents that were fed sideways into the scanner, rotating landscape PDFs to portrait orientation for consistent archiving, fixing the orientation of PDFs generated in the wrong direction. ### [Rotate Page](https://docs.pdf4me.com/pdf4me-api/organize/rotate-page/) **POST** `/api/v2/RotatePage` Rotates individual pages within a PDF, each by a specified angle. Allows different rotation angles for different pages in a single request. Parameters: - `docContent` (string, Base64) — Base64-encoded PDF. Required. - `docName` (string) — Source filename. Required. - `pages` (array of objects) — Per-page rotation instructions. Each object: - `pageNumber` (integer) — Page to rotate (1-indexed). - `rotationAngle` (integer) — Degrees of clockwise rotation: `90`, `180`, or `270`. Output: `docContent` (Base64 PDF with specified pages rotated). --- ## REST API — Image Operations ### [Compress Image](https://docs.pdf4me.com/pdf4me-api/image/compress-image/) **POST** `/v2/CompressImage` Reduces image file size with configurable quality. Supports JPEG, PNG, and WebP. PNG compression is lossless; JPEG and WebP use lossy compression with configurable quality factor. Key parameters: `docContent` (Base64 image), `quality` (1–100 for JPEG/WebP), `outputFormat`. Output: `docContent` (Base64 compressed image), size reduction stats. ### [Convert Image Format](https://docs.pdf4me.com/pdf4me-api/image/convert-image-format/) **POST** `/v2/ConvertImageFormat` Converts between image formats: JPEG, PNG, WebP, TIFF, BMP, GIF. Handles colour space conversion (RGB, CMYK, grayscale) automatically. Key parameters: `docContent` (Base64 source image), `outputFormat` (`"jpeg"`, `"png"`, `"webp"`, `"tiff"`, `"bmp"`). ### [Create Image from PDF](https://docs.pdf4me.com/pdf4me-api/image/create-image-from-pdf/) **POST** `/v2/CreateImageFromPdf` Renders PDF pages as high-resolution raster images. Each page becomes a separate image file. Key parameters: `docContent` (Base64 PDF), `outputFormat` (`"jpeg"`, `"png"`, `"tiff"`), `dpi` (dots per inch — 72 for screen, 150 for medium, 300 for print), `pageNumber` (`"all"` or specific page). Output: array of `docContent` (Base64 images, one per page) or ZIP. Use cases: generating PDF thumbnails, creating printable image sheets, extracting pages as images for OCR. ### [OCR on Image](https://docs.pdf4me.com/pdf4me-api/image/image-extract-text/) **POST** `/v2/ImageExtractText` Extracts text from JPEG, PNG, TIFF, or BMP images using optical character recognition. Returns plain text or structured output with position data. Key parameters: `docContent` (Base64 image), `language` (BCP-47 code, e.g., `"en"`, `"de"`), `outputType` (`"text"`, `"json"`). Output: extracted text string or JSON with text blocks and bounding boxes. --- ## REST API — Excel Operations ### [Merge Excel Files](https://docs.pdf4me.com/pdf4me-api/excel/merge-files/) **POST** `/v2/MergeExcelFiles` Combines multiple .xlsx workbooks into a single workbook. Each source workbook's sheets are appended to the output. Key parameters: `docContents` (array of Base64 XLSX files). Output: `docContent` (Base64 merged XLSX). ### [Extract Rows](https://docs.pdf4me.com/pdf4me-api/excel/extract-rows/) **POST** `/v2/ExtractRows` Extracts rows from an Excel worksheet matching a filter condition. Supports contains, equals, starts-with, greater-than/less-than conditions on any column. Key parameters: `docContent` (Base64 XLSX), `sheetName`, `filterColumn`, `filterOperator`, `filterValue`. Output: `docContent` (Base64 XLSX containing only matching rows). --- ## REST API — Word Operations ### [Merge Word Documents](https://docs.pdf4me.com/pdf4me-api/pdf4me-word/merge-documents/) **POST** `/v2/MergeWordDocuments` Combines multiple .docx Word documents into a single document, preserving styles, headers, footers, and page numbering from each section. Key parameters: `docContents` (array of Base64 DOCX files), `addPageBreak` (boolean — insert a page break between merged documents). Output: `docContent` (Base64 merged DOCX). ### [Compare Documents](https://docs.pdf4me.com/pdf4me-api/pdf4me-word/compare-documents/) **POST** `/v2/CompareDocuments` Compares two Word documents and returns a Word document showing tracked changes (additions in green, deletions in red strikethrough). Equivalent to Word's "Compare Documents" feature. Key parameters: `originalDocContent` (Base64 DOCX), `revisedDocContent` (Base64 DOCX). Output: `docContent` (Base64 DOCX with tracked changes). Use cases: contract version comparison, detecting changes between document drafts, compliance review of document revisions. ### [Replace Text in Word](https://docs.pdf4me.com/pdf4me-api/pdf4me-word/replace-text/) **POST** `/v2/ReplaceText` Finds and replaces text strings in a Word document. Supports exact match, case-insensitive, and regex-based replacement. Can replace text in the document body, headers, footers, and tables. Key parameters: `docContent` (Base64 DOCX), `findText`, `replaceText`, `matchCase` (boolean). Output: `docContent` (Base64 DOCX with replacements applied). --- ## Document Generation — Word Template Syntax PDF4me's document generation engine uses Word (.docx) files as templates. Data is bound using `{{variable}}` syntax in the document body, headers, footers, and tables. ### [Template Syntax Overview](https://docs.pdf4me.com/general-guidelines/word-template-syntax/overview/) All template variables use `{{fieldName}}` syntax. The template is a standard .docx file edited in Microsoft Word or LibreOffice. Variable names must match JSON data keys exactly (case-sensitive). Supported output formats: PDF and DOCX. ### [Variables](https://docs.pdf4me.com/general-guidelines/word-template-variables/) Simple text substitution: `{{firstName}}` in the template is replaced with the `firstName` value from the JSON data object. Supports nested object access: `{{address.city}}`. Null/missing values render as empty string. ### [Tables](https://docs.pdf4me.com/general-guidelines/word-template-tables/) Dynamic tables are driven by JSON arrays. Add `{{#items}}` at the start of the repeat row and `{{/items}}` at the end. Each row is rendered once per array item. Nested object properties are accessible within the repeat block: `{{items.name}}`, `{{items.price}}`. ### [Repeat Paragraphs](https://docs.pdf4me.com/general-guidelines/word-template-syntax/repeat-paragraphs/) Repeat any paragraph block (not just table rows) for each item in an array. Use `{{#blockName}}...{{/blockName}}` block tags. Useful for generating list items, address blocks, or section repeats. ### [Insert Images](https://docs.pdf4me.com/general-guidelines/word-template-syntax/insert-images/) Embed dynamic images by placing an image placeholder in the Word template and referencing it in the data JSON. Images can be provided as Base64 strings or public URLs. The template image size defines the rendered output size. ### [Insert HTML](https://docs.pdf4me.com/general-guidelines/word-template-syntax/insert-html/) Inject HTML content into Word output using a special image placeholder marked with `[html]` prefix. The HTML is rendered and embedded as formatted content, supporting basic text formatting, lists, and inline styles. ### [Formatting](https://docs.pdf4me.com/general-guidelines/word-template-syntax/formatting/) Format variable output using pipe syntax: `{{amount | currency}}`, `{{date | dateFormat:"dd/MM/yyyy"}}`, `{{value | toUpper}}`. Built-in formatters: currency, date, uppercase, lowercase, number format. ### [Generate from Word Template (Power Automate)](https://docs.pdf4me.com/general-guidelines/generate-document-word-template-power-automate/) Step-by-step guide: store the .docx template in SharePoint/OneDrive, use the PDF4me "Generate Document" action in Power Automate, map dynamic fields from a SharePoint list or form responses to template variables, and save the output PDF back to SharePoint. --- ## No-Code Integrations PDF4me integrates natively with the four major no-code/low-code automation platforms. Each platform has a dedicated connector or node — no manual API calls, no Base64 encoding, no coding required. Files flow as binary data through the platform's native file handling system. **Integration hub:** https://docs.pdf4me.com/integration/ --- ### Power Automate Integration **Getting started:** https://docs.pdf4me.com/integration/power-automate/getting-started/ **Connector type:** Premium connector (requires Power Automate Premium plan or per-flow plan) PDF4me is available as a certified Microsoft Power Automate connector. Install it from the connector gallery by searching "PDF4me", click "Add a connection", and enter your PDF4me API key. The connector exposes 100+ PDF4me operations as individual Power Automate actions. **How files work in Power Automate:** Use the "File Content" output from SharePoint, OneDrive, Dropbox, or any file-source action. Pass it directly to the PDF4me action's "File Content" field. The connector handles Base64 encoding internally. Output files from PDF4me actions are returned as binary content — pass them to a "Create file" action in SharePoint, OneDrive, or any destination connector. **Power Automate — Convert actions:** - [Convert to PDF](https://docs.pdf4me.com/integration/power-automate/convert/convert-to-pdf/) — Convert Word, Excel, PowerPoint, images, HTML to PDF - [Convert URL to PDF](https://docs.pdf4me.com/integration/power-automate/convert/convert-url-to-pdf/) — Render a webpage URL to PDF - [HTML to PDF](https://docs.pdf4me.com/integration/power-automate/convert/html-to-pdf/) — Convert HTML string or file to PDF - [PDF to Word](https://docs.pdf4me.com/integration/power-automate/convert/pdf-to-word/) — Convert PDF to editable DOCX - [PDF to Excel](https://docs.pdf4me.com/integration/power-automate/convert/pdf-to-excel/) — Extract tables from PDF to XLSX - [PDF to PowerPoint](https://docs.pdf4me.com/integration/power-automate/convert/pdf-to-powerpoint/) — Convert PDF pages to PPTX slides - [Create PDF/A](https://docs.pdf4me.com/integration/power-automate/convert/create-pdfa/) — Archival PDF/A conversion (PDF/A-1b, 2b, 3b) - [Flatten PDF](https://docs.pdf4me.com/integration/power-automate/convert/flatten-pdf/) — Flatten form fields and annotations - [Linearize PDF](https://docs.pdf4me.com/integration/power-automate/convert/linearize-pdf/) — Optimise for fast web view **Power Automate — Edit actions:** - [Add Header/Footer](https://docs.pdf4me.com/integration/power-automate/edit/add-header-footer-to-pdf/) — HTML headers/footers with page number variables - [Add Page Numbers](https://docs.pdf4me.com/integration/power-automate/edit/add-page-number-to-pdf/) — Configurable page number position and style - [Add Image Watermark](https://docs.pdf4me.com/integration/power-automate/edit/add-image-watermark-to-pdf/) — Overlay logo or image stamp on pages - [Add Text Watermark](https://docs.pdf4me.com/integration/power-automate/edit/add-text-watermark-to-pdf/) — Text stamp with rotation, opacity, font control - [Sign PDF](https://docs.pdf4me.com/integration/power-automate/edit/sign-pdf/) — Place signature image on a PDF page - [Add Margin](https://docs.pdf4me.com/integration/power-automate/edit/add-margin-to-pdf/) — Add whitespace margins to pages - [Add Attachment](https://docs.pdf4me.com/integration/power-automate/edit/add-attachments-to-pdf/) — Embed files inside a PDF - [Update Hyperlinks](https://docs.pdf4me.com/integration/power-automate/edit/pdf-update-hyperlinks/) — Replace link URLs in PDF annotations **Power Automate — Merge & Split actions:** - [Merge 2 PDFs](https://docs.pdf4me.com/integration/power-automate/merge-split/merge-2-pdfs/) — Combine two PDFs into one - [Merge Overlay](https://docs.pdf4me.com/integration/power-automate/merge-split/merge-overlay/) — Overlay one PDF over another (letterhead) - [Split PDF](https://docs.pdf4me.com/integration/power-automate/merge-split/split-pdf/) — Split by page count, page number, or range - [Split by Barcode](https://docs.pdf4me.com/integration/power-automate/merge-split/split-pdf-barcode/) — Split at barcode separator pages - [Split by Text](https://docs.pdf4me.com/integration/power-automate/merge-split/split-pdf-by-text/) — Split where header text appears - [Split by Swiss QR](https://docs.pdf4me.com/integration/power-automate/merge-split/split-pdf-by-swiss-qr/) — Split at Swiss QR bill boundaries **Power Automate — AI actions:** - [AI Invoice Parser](https://docs.pdf4me.com/integration/power-automate/pdf4me-ai/ai-invoice-parser/) — Extract vendor, amount, date, line items from invoices - [AI Contract Parser](https://docs.pdf4me.com/integration/power-automate/pdf4me-ai/ai-contract-parser/) — Extract parties, dates, clauses from contracts - [AI Receipt Parser](https://docs.pdf4me.com/integration/power-automate/pdf4me-ai/ai-receipt-parser/) — Extract merchant, date, total from receipts - [AI Bank Statement Parser](https://docs.pdf4me.com/integration/power-automate/pdf4me-ai/ai-bank-statement-parser/) — Extract transactions and balances - [AI Tax Document Parser](https://docs.pdf4me.com/integration/power-automate/pdf4me-ai/ai-tax-document-parser/) — Extract fields from tax forms - [AI Pay Stub Parser](https://docs.pdf4me.com/integration/power-automate/pdf4me-ai/ai-pay-stub-payslip-parser/) — Extract salary, deductions from payslips - [AI Process Document](https://docs.pdf4me.com/integration/power-automate/pdf4me-ai/ai-process-document/) — Custom schema-driven AI extraction **Power Automate — Generate actions:** - [Generate Document (Single)](https://docs.pdf4me.com/integration/power-automate/generate/generate-document-single/) — Merge template with one data record - [Generate Documents (Multiple)](https://docs.pdf4me.com/integration/power-automate/generate/generate-documents-multiple/) — Bulk generation from array of data records **Power Automate — Security actions:** - [Protect PDF](https://docs.pdf4me.com/integration/power-automate/security/protect-pdf/) — Apply password and permission restrictions - [Unlock PDF](https://docs.pdf4me.com/integration/power-automate/security/unlock-pdf/) — Remove password protection **Power Automate — Barcode actions:** - [Add Barcode to PDF](https://docs.pdf4me.com/integration/power-automate/barcode/add-barcode-to-pdf/) — Embed barcode at position - [Read Barcode from PDF](https://docs.pdf4me.com/integration/power-automate/barcode/read-barcode-from-pdf/) — Extract barcode values and positions - [Create Swiss QR Bill](https://docs.pdf4me.com/integration/power-automate/barcode/create-swissqr-bill/) — Generate Swiss QR payment section --- ### Zapier Integration **Getting started:** https://docs.pdf4me.com/integration/zapier/getting-started/ **Install:** Search "PDF4me" in the Zapier App Directory, connect with your API key. PDF4me in Zapier works as an Action step triggered by any Zapier trigger — file uploads to Google Drive, Gmail attachments, form submissions (Typeform, Jotform), Airtable records, Salesforce events, Webhooks, and more. All major PDF4me operations are available as Zapier actions. **How files work in Zapier:** Zapier passes files as file objects (URL + content). PDF4me's Zapier integration accepts both file URL and binary data. Output is returned as a Zapier file object with a download URL — pass it to Google Drive, Dropbox, Gmail, Slack, or any downstream action that accepts files. **Zapier — Convert actions:** - [Convert to PDF](https://docs.pdf4me.com/integration/zapier/convert/convert-to-pdf/) — Convert 50+ formats to PDF - [Convert URL to PDF](https://docs.pdf4me.com/integration/zapier/convert/convert-url-to-pdf/) — Webpage to PDF - [HTML to PDF](https://docs.pdf4me.com/integration/zapier/convert/convert-html-to-pdf/) — HTML string or file to PDF - [PDF to Word](https://docs.pdf4me.com/integration/zapier/convert/pdf-to-word/) — PDF to editable DOCX - [PDF to Excel](https://docs.pdf4me.com/integration/zapier/convert/pdf-to-excel/) — PDF tables to XLSX - [Create PDF/A](https://docs.pdf4me.com/integration/zapier/convert/create-pdfa/) — Archival PDF/A conversion - [Flatten PDF](https://docs.pdf4me.com/integration/zapier/convert/flatten-pdf/) — Flatten interactive PDF fields **Zapier — Barcode actions:** - [Add Barcode to PDF](https://docs.pdf4me.com/integration/zapier/barcode/add-barcode-to-pdf/) — Embed barcodes and QR codes - [Create Barcode](https://docs.pdf4me.com/integration/zapier/barcode/create-barcode/) — Generate standalone barcode image - [Create Swiss QR Bill](https://docs.pdf4me.com/integration/zapier/barcode/create-swissqr-bill/) — Swiss payment QR generation - [Read Barcode from PDF](https://docs.pdf4me.com/integration/zapier/barcode/read-barcode-from-pdf/) — Decode barcode values **Zapier — AI actions:** - [AI Invoice Parser](https://docs.pdf4me.com/integration/zapier/pdf4me-ai/ai-invoice-parser/) — Structured invoice data extraction - [AI Receipt Parser](https://docs.pdf4me.com/integration/zapier/pdf4me-ai/ai-receipt-parser/) — Receipt data extraction - [AI Contract Parser](https://docs.pdf4me.com/integration/zapier/pdf4me-ai/ai-contract-parser/) — Contract data extraction - [AI Process Document](https://docs.pdf4me.com/integration/zapier/pdf4me-ai/ai-process-document/) — Custom AI extraction schema **Zapier — Merge & Split actions:** - [Merge 2 PDFs](https://docs.pdf4me.com/integration/zapier/merge-split/merge-2-pdfs/) — Combine two PDFs - [Split PDF](https://docs.pdf4me.com/integration/zapier/merge-split/split-pdf/) — Split by page - [Split by Barcode](https://docs.pdf4me.com/integration/zapier/merge-split/split-by-barcode/) — Split at barcode pages **Zapier — Edit actions:** - [Add Header/Footer](https://docs.pdf4me.com/integration/zapier/edit/add-html-header-footer-to-pdf/) — Input PDF + header/footer HTML; outputs PDF with repeated header/footer on selected pages - [Add Page Numbers](https://docs.pdf4me.com/integration/zapier/edit/add-page-number-to-pdf/) — Input PDF + numbering format/position; outputs PDF with rendered page numbers - [Add Margin](https://docs.pdf4me.com/integration/zapier/edit/add-margin-to-pdf/) — Input PDF + margin values; outputs PDF canvas expanded with whitespace margins - [Sign PDF](https://docs.pdf4me.com/integration/zapier/edit/sign-pdf/) — Input PDF + signature image + placement options; outputs visually signed PDF - [Add Attachment](https://docs.pdf4me.com/integration/zapier/edit/add-attachment-to-pdf/) — Input PDF + one or more files; outputs PDF with embedded attachments **Zapier — Generate actions:** - [Generate Document (Single)](https://docs.pdf4me.com/integration/zapier/generate/generate-document-single/) — Input DOCX template + one JSON record; outputs one merged document/PDF - [Generate Documents (Multiple)](https://docs.pdf4me.com/integration/zapier/generate/generate-documents-multiple/) — Input template + array of JSON records; outputs batch of generated documents --- ### Make (formerly Integromat) Integration **Getting started:** https://docs.pdf4me.com/integration/make/getting-started/ **Install:** Search "PDF4me" in the Make App Marketplace. Make (formerly Integromat) is a visual automation platform. PDF4me integrates as a Make app with modules for every API operation. Files flow as Make binary data bundles between modules — no encoding needed. Make scenarios can loop, filter, route, and aggregate files using Make's built-in logic tools alongside PDF4me modules. **How files work in Make:** Files from Google Drive, Dropbox, HTTP Download, OneDrive, or any file module are passed as Make binary data. PDF4me modules receive and output binary data natively. Use Make's Router, Iterator, and Aggregator to build complex multi-step PDF workflows. **Make — Convert modules:** - [Convert to PDF](https://docs.pdf4me.com/integration/make/convert/convert-to-pdf/) — Input Office/image/text file; outputs standard PDF version of the source - [URL to PDF](https://docs.pdf4me.com/integration/make/convert/convert-url-to-pdf/) — Input public webpage URL; outputs rendered page as PDF - [HTML to PDF](https://docs.pdf4me.com/integration/make/convert/convert-html-to-pdf/) — Input HTML markup/file; outputs PDF generated from HTML layout - [Markdown to PDF](https://docs.pdf4me.com/integration/make/convert/convert-markdown-to-pdf/) — Input Markdown content/file; outputs formatted PDF - [PDF to Word](https://docs.pdf4me.com/integration/make/convert/pdf-to-word/) — Input PDF; outputs editable DOCX document - [PDF to Excel](https://docs.pdf4me.com/integration/make/convert/pdf-to-excel/) — Input PDF with tables; outputs XLSX with extracted tabular data - [PDF to PowerPoint](https://docs.pdf4me.com/integration/make/convert/pdf-to-powerpoint/) — Input PDF; outputs PPTX with slide-per-page conversion - [Create PDF/A](https://docs.pdf4me.com/integration/make/convert/create-pdfa/) — Input PDF; outputs PDF/A-compliant archival document - [Flatten PDF](https://docs.pdf4me.com/integration/make/convert/flatten-pdf/) — Input interactive PDF; outputs flattened PDF with non-editable fields/annotations - [Convert Word to PDF Form](https://docs.pdf4me.com/integration/make/convert/convert-word-to-pdf-form/) — Input DOCX template with form markers; outputs fillable PDF form - [Convert Visio](https://docs.pdf4me.com/integration/make/convert/convert-visio/) — Input VSD/VSDX file; outputs converted PDF - [JSON to Excel](https://docs.pdf4me.com/integration/make/convert/convert-json-to-excel/) — Input JSON payload + mapping/template; outputs structured XLSX file **Make — Edit modules:** - [Add Image Watermark](https://docs.pdf4me.com/integration/make/edit/add-image-watermark-to-pdf/) — Input PDF + image + placement options; outputs PDF stamped with image watermark - [Add Text Watermark](https://docs.pdf4me.com/integration/make/edit/add-text-watermark-to-pdf/) — Input PDF + text + style options; outputs PDF stamped with text watermark - [Add Margin](https://docs.pdf4me.com/integration/make/edit/add-margin-to-pdf/) — Input PDF + margin settings; outputs PDF with increased page margins - [Add Page Numbers](https://docs.pdf4me.com/integration/make/edit/add-page-number-to-pdf/) — Input PDF + numbering rules; outputs PDF with visible page numbering - [Sign PDF](https://docs.pdf4me.com/integration/make/edit/sign-pdf/) — Input PDF + signature image + coordinates; outputs visually signed PDF - [Add Attachment](https://docs.pdf4me.com/integration/make/edit/add-attachments-to-pdf/) — Input PDF + attachment files; outputs PDF package with embedded files - [Update Hyperlinks](https://docs.pdf4me.com/integration/make/edit/pdf-update-hyperlinks/) — Input PDF + old/new URL mapping; outputs PDF with updated link targets **Make — AI modules:** - [AI Process Invoice](https://docs.pdf4me.com/integration/make/pdf4me-ai/ai-process-invoice/) — Input invoice PDF/image; outputs structured fields like vendor, totals, taxes, line items - [AI Process Receipt](https://docs.pdf4me.com/integration/make/pdf4me-ai/ai-process-receipt/) — Input receipt document; outputs merchant, date, totals, tax, and payment data - [AI Process Bank Statement](https://docs.pdf4me.com/integration/make/pdf4me-ai/ai-process-bank-statement/) — Input statement PDF; outputs account details and normalized transaction rows - [AI Process Tax Document](https://docs.pdf4me.com/integration/make/pdf4me-ai/ai-process-tax-document/) — Input tax form document; outputs key tax fields as structured JSON - [AI Process Pay Stub](https://docs.pdf4me.com/integration/make/pdf4me-ai/ai-process-pay-stub-payslip/) — Input payslip/pay stub; outputs earnings, deductions, and net pay fields **Make — Generate modules:** - [Generate Document (Single)](https://docs.pdf4me.com/integration/make/generate/generate-document-single/) — Input template + single data object; outputs one generated document - [Generate Documents (Multiple)](https://docs.pdf4me.com/integration/make/generate/generate-documents-multiple/) — Input template + data array; outputs one generated document per record **Make — Merge & Split modules:** - [Merge 2 PDFs](https://docs.pdf4me.com/integration/make/merge-split/merge-2-pdfs/) — Input two PDFs; outputs one combined PDF in defined order - [Merge Multiple PDFs](https://docs.pdf4me.com/integration/make/merge-split/merge-multiple-pdfs/) — Input list of PDFs; outputs a single merged PDF - [Merge Overlay](https://docs.pdf4me.com/integration/make/merge-split/merge-overlay/) — Input base PDF + overlay PDF; outputs stamped/overlayed PDF pages - [Split PDF](https://docs.pdf4me.com/integration/make/merge-split/split-pdf/) — Input PDF + split rule; outputs multiple PDF parts - [Split by Barcode](https://docs.pdf4me.com/integration/make/merge-split/split-by-barcode/) — Input PDF + barcode pattern/rule; outputs new file per barcode section - [Split by Text](https://docs.pdf4me.com/integration/make/merge-split/split-by-text/) — Input PDF + text marker; outputs split files at marker boundaries - [Split by Swiss QR](https://docs.pdf4me.com/integration/make/merge-split/split-by-swiss-qr/) — Input PDF with Swiss QR bills; outputs one file per detected bill **Make — Extract modules:** - [Classify Document](https://docs.pdf4me.com/integration/make/extract/classify-document/) — Input document + classifier template; outputs predicted class label(s) - [Parse Document](https://docs.pdf4me.com/integration/make/extract/parse-document/) — Input document + extraction schema; outputs mapped key-value JSON - [Extract Form Data](https://docs.pdf4me.com/integration/make/extract/extract-pdf-form-data/) — Input fillable PDF; outputs form fields and current values - [Extract Text](https://docs.pdf4me.com/integration/make/extract/extract-text-by-expression/) — Input PDF + expressions/anchors; outputs matched text snippets - [Extract Pages](https://docs.pdf4me.com/integration/make/extract/extract-pages/) — Input PDF + page selection; outputs PDF containing selected pages only - [Extract Resources](https://docs.pdf4me.com/integration/make/extract/extract-resources/) — Input PDF; outputs embedded resources such as images and assets - [Extract Attachment](https://docs.pdf4me.com/integration/make/extract/extract-attachment-from-pdf/) — Input PDF with embedded files; outputs extracted attachment binaries **Make — Barcode modules:** - [Add Barcode to PDF](https://docs.pdf4me.com/integration/make/barcode/add-barcode-to-pdf/) — Input PDF + barcode payload/settings; outputs PDF with inserted barcode/QR - [Create Barcode](https://docs.pdf4me.com/integration/make/barcode/create-barcode/) — Input barcode text + format; outputs barcode image/document - [Read from PDF](https://docs.pdf4me.com/integration/make/barcode/read-barcodes-from-pdf/) — Input PDF/image; outputs decoded barcode values and metadata - [Create Swiss QR Bill](https://docs.pdf4me.com/integration/make/barcode/create-swissqr-bill/) — Input payment data; outputs Swiss QR bill PDF/section for invoices - [Read Swiss QR](https://docs.pdf4me.com/integration/make/barcode/read-swissqr-code/) — Input Swiss QR document; outputs parsed payment fields --- ### n8n Integration **Getting started:** https://docs.pdf4me.com/integration/n8n/getting-started/ **Install:** n8n Settings → Community Nodes → install `n8n-nodes-pdf4me` n8n is an open-source workflow automation platform available as a self-hosted or cloud service. The PDF4me n8n community node provides all major PDF4me operations as n8n workflow nodes. Files are handled as n8n binary data items — the same binary data format used by n8n's built-in Google Drive, Dropbox, S3, FTP, and HTTP Request nodes. **How files work in n8n:** Binary data flows between nodes as named binary properties. The PDF4me node reads from and outputs to n8n binary data, compatible with all n8n file-source nodes. Use n8n's Split In Batches, Merge, IF, and Code nodes to build advanced conditional PDF processing workflows. **n8n — Available operations:** - Convert: [to PDF](https://docs.pdf4me.com/integration/n8n/convert/convert-to-pdf/) · [URL to PDF](https://docs.pdf4me.com/integration/n8n/convert/convert-url-to-pdf/) · [HTML to PDF](https://docs.pdf4me.com/integration/n8n/convert/convert-html-to-pdf/) · [PDF to Word](https://docs.pdf4me.com/integration/n8n/convert/pdf-to-word/) · [PDF to Excel](https://docs.pdf4me.com/integration/n8n/convert/pdf-to-excel/) · [Create PDF/A](https://docs.pdf4me.com/integration/n8n/convert/create-pdfa/) · [Flatten](https://docs.pdf4me.com/integration/n8n/convert/flatten-pdf/) - Edit: [Image Watermark](https://docs.pdf4me.com/integration/n8n/edit/add-image-watermark-to-pdf/) · [Text Watermark](https://docs.pdf4me.com/integration/n8n/edit/add-text-watermark-to-pdf/) · [Page Numbers](https://docs.pdf4me.com/integration/n8n/edit/add-page-number-to-pdf/) · [Sign](https://docs.pdf4me.com/integration/n8n/edit/sign-pdf/) · [Margin](https://docs.pdf4me.com/integration/n8n/edit/add-margin-to-pdf/) - Merge & Split: [Merge PDFs](https://docs.pdf4me.com/integration/n8n/merge-split/merge-2-pdfs/) · [Split PDF](https://docs.pdf4me.com/integration/n8n/merge-split/split-pdf/) · [Split by Barcode](https://docs.pdf4me.com/integration/n8n/merge-split/split-pdf-barcode/) - Barcode: [Add Barcode](https://docs.pdf4me.com/integration/n8n/barcode/add-barcode-to-pdf/) · [Read Barcode](https://docs.pdf4me.com/integration/n8n/barcode/read-barcode-from-pdf/) · [Create Barcode](https://docs.pdf4me.com/integration/n8n/barcode/create-barcode/) - Forms: [Fill Form](https://docs.pdf4me.com/integration/n8n/forms/fill-a-pdf-form/) · [Extract Form Data](https://docs.pdf4me.com/integration/n8n/extract/extract-form-data-from-pdf/) - AI: [AI Process Document](https://docs.pdf4me.com/integration/n8n/pdf4me-ai/) · [Invoice Parser](https://docs.pdf4me.com/integration/n8n/pdf4me-ai/ai-invoice-parser/) · [Receipt Parser](https://docs.pdf4me.com/integration/n8n/pdf4me-ai/ai-receipt-parser/) - Generate: [Generate Document](https://docs.pdf4me.com/integration/n8n/generate/generate-document-single/) · [Bulk Generate](https://docs.pdf4me.com/integration/n8n/generate/generate-documents-multiple/) - Security: [Protect](https://docs.pdf4me.com/integration/n8n/security/protect-pdf/) · [Unlock](https://docs.pdf4me.com/integration/n8n/security/unlock-pdf/) - Optimize: [Compress PDF](https://docs.pdf4me.com/integration/n8n/optimize/compress-pdf/) - Find & Search: [OCR](https://docs.pdf4me.com/integration/n8n/find-search/pdf-ocr/) --- ### PDF4me MCP Integration **Getting started:** https://docs.pdf4me.com/integration/pdf4me-mcp/getting-started/ PDF4me MCP (Model Context Protocol) server enables AI coding assistants to call PDF4me document operations as tools. Supported clients: Cursor, VS Code (GitHub Copilot), Claude Desktop, Windsurf, Continue, and any MCP-compatible AI tool. **Installation:** `uvx pdf4me-mcp` (requires Python with uv installed) **Configuration (example for Cursor / Claude Desktop `mcp.json`):** ```json { "mcpServers": { "pdf4me": { "command": "uvx", "args": ["pdf4me-mcp"], "env": { "PDF4ME_API_KEY": "your-api-key-here" } } } } ``` **On Windows:** Replace `"uvx"` with the full path, e.g. `"C:\\Users\\YourName\\AppData\\Roaming\\Python\\Scripts\\uvx.exe"`. After connecting, AI assistants can convert, compress, merge, split, OCR, and process documents directly from natural language instructions without writing API code. --- ## Extensions **Documentation hub:** https://docs.pdf4me.com/extensions/ ### [PDF4me Chrome Extension](https://docs.pdf4me.com/extensions/install-pdf4me-chrome/) Adds PDF4me document actions directly to the Chrome browser via a right-click context menu and browser toolbar button. Works on any webpage containing a PDF link or on open PDF tabs. Features: convert files to PDF, compress PDFs, merge documents, sign PDFs, run OCR on scanned PDFs — all triggered from within the browser. File processing uses your PDF4me account credentials (API key) for authentication. Install from the Chrome Web Store. No file data is sent to third parties — processing routes through the PDF4me API under your account. ### [PDF4me Google Workspace Add-on](https://docs.pdf4me.com/extensions/install-pdf4me-google-workspace/) Integrates PDF4me operations into Google Docs, Google Sheets, and Google Drive via the Google Workspace Marketplace. Actions available from within Google Workspace: convert Google Docs to PDF, compress PDFs stored in Drive, merge Drive files, OCR scanned PDFs, and more. Install from the Google Workspace Marketplace. Once installed, PDF4me appears in the Extensions menu in Docs/Sheets and in the right-click context menu in Drive. ### [PDF4me Microsoft Teams App](https://docs.pdf4me.com/extensions/install-pdf4me-microsoft-teams/) Adds PDF4me document automation capabilities inside Microsoft Teams as a tab application and message extension. Team members can convert, compress, merge, and sign PDFs directly within Teams channels without leaving the collaboration environment. Install from the Microsoft Teams App Store. Requires a PDF4me account for authentication. --- ## Interactive API Tester **URL:** https://docs.pdf4me.com/url-api-tester/ The PDF4me Interactive API Tester is a browser-based tool for exploring and testing all PDF4me REST API endpoints without writing any code. It provides a form-based UI for every endpoint — upload source files, configure all parameters via dropdown menus and text fields, and submit the request. The response is displayed in real time, including the processed output file (downloadable), raw JSON response, and HTTP status code. The API Tester is useful for: - Verifying endpoint behaviour before implementing in code - Testing edge cases (password-protected files, large files, specific page ranges) - Exploring which parameters produce which output - Debugging integration issues by comparing expected vs. actual API responses - Demonstrating PDF4me capabilities to stakeholders without coding Requires a PDF4me API key. The key is entered once in the tester session and used for all requests. --- ## Developer Blog — Full Tutorial Index The PDF4me developer blog covers end-to-end tutorials for real-world document automation use cases on Power Automate, Zapier, Make, n8n, and direct REST API. All posts include step-by-step screenshots, configuration details, and sample files. **Blog home:** https://docs.pdf4me.com/blog **Power Automate tutorials:** - [AI Invoice Processing in Power Automate](https://docs.pdf4me.com/blog/ai-invoice-processing-power-automate/) — Build an invoice automation flow using PDF4me AI Invoice Parser + SharePoint - [Extract Text in Power Automate](https://docs.pdf4me.com/blog/extract-text-power-automate/) — Extract text from PDFs/scans for downstream automation logic - [Fill PDF Form in Power Automate](https://docs.pdf4me.com/blog/fill-pdf-form-power-automate-workflow/) — Map trigger data into PDF form fields and produce filled documents - [HTML to PDF in Power Automate](https://docs.pdf4me.com/blog/html-to-pdf-power-automate-workflow/) — Generate PDF output from HTML content within a flow - [PDF to Excel (OCR) in Power Automate](https://docs.pdf4me.com/blog/pdf-to-excel-power-automate-ocr-workflow/) — OCR scanned PDFs and export table data to Excel - [Validate PDF/A in Power Automate](https://docs.pdf4me.com/blog/validate-pdfa-dropbox-power-automate/) — Validate archival PDF/A compliance in an automated workflow - [Split PDF by Barcode in Power Automate](https://docs.pdf4me.com/blog/split-pdf-by-barcode-power-automate/) — Auto-split scanned document batches using barcode separator sheets - [Rename PDFs Using Barcode in Power Automate](https://docs.pdf4me.com/blog/rename-pdfs-using-barcode-powerautomate/) — Read barcode from PDF and use value to rename the file in SharePoint - [Convert PDF to PDF/A in Power Automate](https://docs.pdf4me.com/blog/convert-pdf-pdfa-power-automate-archival/) — Convert standard PDFs to long-term archival format - [Convert Word to PDF/A in Power Automate](https://docs.pdf4me.com/blog/word-to-pdfa-power-automate-convert-then-archive/) — Convert DOCX to PDF and archive as PDF/A in one flow - [Sign + Fill PDF in Power Automate](https://docs.pdf4me.com/blog/sign-fill-pdf-power-automate-workflow/) — Populate form fields and apply signature image in a single process - [Swiss QR Merge in Power Automate](https://docs.pdf4me.com/blog/swiss-qr-merge-power-automate/) — Generate/merge Swiss QR payment content into final PDF outputs - [ZUGFeRD Invoice in Power Automate](https://docs.pdf4me.com/blog/zugferd-invoice-power-automate-dropbox-json-workflow/) — Generate ZUGFeRD e-invoices using PDF4me + Dropbox - [Mail Merge Generate Document in Power Automate](https://docs.pdf4me.com/blog/generate-document-power-automate/) — Generate personalised PDF documents from SharePoint list data - [Extract Form Data from PDF in Power Automate](https://docs.pdf4me.com/blog/extract-form-data-pdf-power-automate-dropbox/) — Extract AcroForm field values and save as JSON to Dropbox - [Excel to PDF in Power Automate](https://docs.pdf4me.com/blog/excel-to-pdf-power-automate-dropbox/) — Convert Excel files from Dropbox to PDF automatically - [Add Barcodes & QR Codes to PDF — Complete Guide](https://docs.pdf4me.com/blog/add-barcodes-qr-codes-to-pdf-complete-guide/) — All barcode types, positioning, use cases **Zapier tutorials:** - [Convert PDF to PDF/A in Zapier](https://docs.pdf4me.com/blog/convert-pdf-pdfa-zapier-archival/) — Archive-ready PDF/A conversion as a Zap step - [HTML to PDF in Zapier](https://docs.pdf4me.com/blog/html-to-pdf-zapier-workflow/) — Convert HTML/web content to PDF in Zapier automations - [AI Invoice to Text in Zapier](https://docs.pdf4me.com/blog/ai-invoice-to-text-zapier-dropbox/) — Parse invoices and output structured text data for routing - [Rename PDFs Using SwissQR in Zapier](https://docs.pdf4me.com/blog/rename-pdfs-using-swissqr-zapier/) — Read Swiss QR values and rename files automatically - [Classify Document in Zapier](https://docs.pdf4me.com/blog/classify-document-pdf4me-zapier/) — Classify incoming documents and branch Zap paths by class - [Add Header/Footer in Zapier](https://docs.pdf4me.com/blog/add-html-header-footer-zapier/) — Apply dynamic HTML header/footer to PDF outputs - [Extract Text from Scanned PDFs in Zapier](https://docs.pdf4me.com/blog/extract-text-zapier-scanned-pdfs/) — OCR and extract searchable text from scans - [Generate Document from Google Docs in Zapier](https://docs.pdf4me.com/blog/google-docs-generate-document-zapier-trigger/) — Trigger template generation from Google Docs events - [SwissQR Bill + Overlay Merge in Zapier](https://docs.pdf4me.com/blog/zapier-swissqr-bill-overlay-merge-dropbox-workflow/) — Build payment-ready PDFs by combining Swiss QR and merge overlay - [Mail Merge in Zapier](https://docs.pdf4me.com/blog/mail-merge-zapier-trigger-workflow/) — Generate personalised PDFs from trigger records - [Rename PDFs Using Barcode in Zapier](https://docs.pdf4me.com/blog/rename-pdfs-using-barcode-zapier/) — Extract barcode values and rename files in storage apps - [Fill PDF Form in Zapier](https://docs.pdf4me.com/blog/fill-pdf-form-zapier-workflow/) — Map Zapier trigger data to AcroForm fields and save filled PDFs to Dropbox - [Split PDF by Barcode in Zapier](https://docs.pdf4me.com/blog/split-pdf-by-barcode-zapier/) — Split multi-document PDFs into separate files using barcode separators - [Word to PDF/A in Zapier](https://docs.pdf4me.com/blog/word-to-pdfa-zapier-convert-then-archive/) — Convert Word files and archive them as PDF/A - [Rename PDFs Using Parse in Zapier](https://docs.pdf4me.com/blog/rename-pdfs-using-parse-zapier/) — Parse document fields and rename files from extracted values - [Extract and Map Invoice Data with Zapier + AI](https://docs.pdf4me.com/blog/extract-and-map-invoice-data-zapier-pdf4me-ai/) — AI Parse Document in Zapier → structured invoice data - [Merge PDFs in Zapier](https://docs.pdf4me.com/blog/merge-pdfs-zapier-workflow/) — Combine files from a Zapier trigger into one merged PDF - [Convert Word to PDF in Zapier](https://docs.pdf4me.com/blog/convert-word-to-pdf-zapier/) — Auto-convert Word attachments from Gmail/Outlook to PDF **Make (Integromat) tutorials:** - [Word to PDF/A in Make](https://docs.pdf4me.com/blog/word-to-pdfa-make-convert-then-archive/) — Convert DOCX and archive result as PDF/A - [Fill PDF Form from JSON in Make](https://docs.pdf4me.com/blog/fill-pdf-form-json-make-workflow/) — Map JSON payload fields to PDF form controls - [Sign + Fill PDF in Make](https://docs.pdf4me.com/blog/sign-fill-pdf-make-workflow/) — Fill forms and place signature image in one scenario - [Rename PDFs Using Parse in Make](https://docs.pdf4me.com/blog/rename-pdfs-using-parse-make/) — Extract values from documents and rename output files - [Classify Document in Make](https://docs.pdf4me.com/blog/classify-document-pdf4me-make/) — Auto-classify incoming documents and route by class - [Split PDF by Barcode in Make](https://docs.pdf4me.com/blog/split-pdf-by-barcode-make/) — Split scanned batches into per-document files using barcodes - [Convert PDF to PDF/A in Make](https://docs.pdf4me.com/blog/convert-pdf-pdfa-archival-make/) — Convert PDFs to archival PDF/A in automated scenarios - [HTML to PDF in Make](https://docs.pdf4me.com/blog/html-to-pdf-make-workflow/) — Generate PDFs from HTML content with Make modules - [PDF to PowerPoint (OCR) in Make](https://docs.pdf4me.com/blog/pdf-to-powerpoint-make-ocr-dropbox/) — OCR and convert document pages into editable PPTX slides - [Rename PDFs Using SwissQR in Make](https://docs.pdf4me.com/blog/rename-pdfs-using-swissqr-make/) — Read Swiss QR bill data to drive file naming - [Rename PDFs Using Barcode in Make](https://docs.pdf4me.com/blog/rename-pdfs-using-barcode-make/) — Decode barcode values and rename workflow outputs - [Mail Merge with Make](https://docs.pdf4me.com/blog/mail-merge-make-workflow/) — Generate personalised documents from Google Sheets using Make + PDF4me - [Mail Merge with Make (Trigger Variant)](https://docs.pdf4me.com/blog/mail-merge-make-trigger-workflow/) — Triggered mail-merge flow for event-driven document generation - [Swiss QR Merge in Make](https://docs.pdf4me.com/blog/swiss-qr-merge-make-workflow/) — Combine Swiss QR payment content with source PDFs - [Merge Multiple PDFs from Folder in Make](https://docs.pdf4me.com/blog/merge-multiple-pdfs-folder-make/) — Merge all files from a watched folder into one PDF - [Parse Invoices with AI in Make](https://docs.pdf4me.com/blog/parse-invoices-ai-make-automation/) — Extract normalized invoice fields for accounting workflows - [Google Docs Generate Document in Make (Trigger Variant)](https://docs.pdf4me.com/blog/google-docs-generate-document-make-trigger/) — Trigger-based generation from Google Docs changes - [Add Header/Footer in Make](https://docs.pdf4me.com/blog/add-html-header-footer-make/) — Apply dynamic HTML header/footer across pages - [Generate Document from Google Docs in Make](https://docs.pdf4me.com/blog/google-docs-generate-document-make/) — Use Google Docs as a template source in Make document generation scenarios - [Extract Form Data in Make](https://docs.pdf4me.com/blog/extract-form-data-pdf-make-dropbox-workflow/) — Extract PDF form data in Make and save results to Dropbox - [Excel to PDF in Make](https://docs.pdf4me.com/blog/excel-to-pdf-make-dropbox-workflow/) — Convert Excel files to PDF in Make workflows **n8n tutorials:** - [HTML to PDF in n8n](https://docs.pdf4me.com/blog/html-to-pdf-n8n-workflow/) — Convert HTML content or web pages to PDF in an n8n workflow - [Compress & Convert to PDF/A in n8n](https://docs.pdf4me.com/blog/compress-pdfa-n8n-workflow/) — Archive and compress PDFs in a single n8n workflow - [ZUGFeRD Invoice in n8n](https://docs.pdf4me.com/blog/zugferd-invoice-n8n-workflow/) — Generate ZUGFeRD-compliant e-invoices in n8n - [Extract Form Data in n8n](https://docs.pdf4me.com/blog/extract-form-data-pdf-n8n-dropbox-workflow/) — Extract PDF form values in n8n and save to Dropbox - [Excel to PDF in n8n](https://docs.pdf4me.com/blog/excel-to-pdf-n8n-dropbox-workflow/) — Convert Excel files to PDF and upload to Dropbox via n8n **REST API / Postman tutorials:** - [Image Compression API Tutorial with Postman](https://docs.pdf4me.com/blog/image-compression-api-postman-tutorial/) — Step-by-step Postman guide for the PDF4me image compression endpoint **Extensions and platform tutorials:** - [PDF4me Extensions Complete Guide](https://docs.pdf4me.com/blog/pdf4me-extensions-complete-guide/) — Chrome Extension, Google Workspace Add-on, Microsoft Teams App — installation and usage --- ## Social & Community - LinkedIn: https://www.linkedin.com/company/pdf4me/ - X (Twitter): https://x.com/pdf4me - Instagram: https://www.instagram.com/pdf4me/ - Support Portal: https://dev.pdf4me.com/support/ - Developer Dashboard: https://dev.pdf4me.com/dashboard/ - Request Demo: https://dev.pdf4me.com/request-demo/