# API2PDF AI integration on Definable

> Api2Pdf is a REST API that enables developers to generate PDFs from HTML, URLs, and various document formats using engines like wkhtmltopdf, Headless Chrome, and LibreOffice.

## What this connects

Api2Pdf is a REST API that enables developers to generate PDFs from HTML, URLs, and various document formats using engines like wkhtmltopdf, Headless Chrome, and LibreOffice.

Vendor: https://portal.api2pdf.com/register

## Tools available

**10** tools available. First 10:

- `API2PDF_ADD_HEADER_FOOTER` — Add Header Footer — Convert HTML to PDF with customizable headers and footers using Headless Chrome. Use for generating reports, invoices, or documents with consistent page numbering, titles, dates, or branding on every page.
- `API2PDF_CHECK_STATUS` — Check API Status — Tool to check the health status of the API2PDF service. Use when you need to verify if the API is available and responding. This endpoint does not require authentication and returns a simple status indicator.
- `API2PDF_DELETE_PDF` — Delete PDF — Delete a previously generated PDF from API2PDF storage by its response ID. By default, API2PDF automatically deletes PDFs after 24 hours. Use this tool when you need to immediately remove a PDF for security or cleanup purposes. The response_id parameter is the ResponseId returned from any PDF generation operation (e.g., merge, convert HTML to PDF, etc.).
- `API2PDF_EXTRACT_PAGES` — Extract PDF Pages — Tool to extract specific pages from a PDF document. Use when you need only certain pages from a larger PDF file. Provide a URL to the source PDF and optionally a page range (0-indexed, end exclusive). Returns a URL to the extracted PDF.
- `API2PDF_LIBREOFFICE_PDF_TO_HTML` — LibreOffice PDF to HTML — Tool to convert a PDF document to HTML using LibreOffice. Use when you need HTML output of a PDF file (experimental; images may be excluded).
- `API2PDF_LIBREOFFICE_THUMBNAIL` — LibreOffice Thumbnail — Tool to generate a thumbnail image of a document using LibreOffice. Use when you need a quick visual preview of a PDF or Office file's first page.
- `API2PDF_MERGE_PDFS` — Merge PDFs — Merge multiple PDF documents into a single PDF file. Provide a list of publicly accessible PDF URLs, and they will be combined in the order specified. The merged PDF is available via a download URL for 24 hours.
- `API2PDF_OPTIMIZE_PDF` — Optimize PDF — Tool to optimize a PDF document to reduce file size while maintaining quality. Use when you need to minimize storage or bandwidth for an existing PDF.
- `API2PDF_REORDER_PAGES` — Reorder PDF Pages — Reorder pages of a PDF document by specifying a new page sequence. Provide a URL to the source PDF and a list of zero-based page indices in the desired order. For example, to reverse a 3-page PDF, use pages=[2,1,0]. The reordered PDF is available via a download URL for 24 hours.
- `API2PDF_ZEBRA_GENERATE_BARCODE` — Generate Barcode or QR Code — Tool to generate barcodes or QR codes using Zebra Crossing (ZXING). Use when you need a barcode or QR code image from text values.

## Auth

Auth schemes: `API_KEY`.

## How agents use API2PDF

Inside a Definable workflow, API2PDF is one of the tools the **Distributor specialist** can call. Example coordination patterns:

- **Researcher → API2PDF** — the Researcher (GPT-5.5) pulls context from API2PDF (records, threads, documents), synthesises findings, and briefs the rest of the team.
- **Writer → Distributor → API2PDF** — the Writer (Claude Opus 4.7) drafts copy in brand voice, the Verifier passes it, then the Distributor writes the result into API2PDF (create record, post message, draft email).
- **Designer / Engineer → Distributor → API2PDF** — the Designer ships an asset or the Engineer ships a code change, the Distributor delivers it via API2PDF (attach file, open PR comment, post status).

The Verifier checks every API2PDF call. On rate limit, schema drift, or auth refresh it self-heals and retries — the workflow completes without manual intervention.

## Categories

- documents — https://definable.ai/apps/category/documents/
- developer tools — https://definable.ai/apps/category/developer-tools/

## Related

- HTML page: https://definable.ai/apps/api2pdf/
- Same category (documents): https://definable.ai/apps/category/documents/
- All integrations: https://definable.ai/apps/
- Workflow (multi-agent loop): https://definable.ai/workflow/
- Apps llms.txt index: https://definable.ai/llms-apps.txt
