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.
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. On Nagent, API2PDF is exposed as a fully-configurable documents integration that any agent can call — 10 actions, and API key authentication. No code is required to wire API2PDF into your workflow — connect it once via the External Integrations panel and reuse it across every agent you build.
Agent builders use API2PDF to automate the kinds of tasks documents teams previously handled manually. Concrete examples — each one is a single agent step in Nagent — include:
Every action and trigger is paired with a structured input/output schema (visible in the sections below), so when you wire API2PDF into Helix — our agentic agent builder — the editor knows exactly what each step expects and produces. Configure once, deploy anywhere across your Nagent agents.
Every operation an agent can call against API2PDF, with input parameters and output schema. Drop these into any step of an agent built in Helix.
API2PDF_ADD_HEADER_FOOTERConvert 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.
Input parameters
Raw HTML content to convert into a PDF. Must include any page structure needed.
Advanced options for header and footer display in the PDF.
Desired filename for the generated PDF (e.g., 'report.pdf'). If omitted, the API assigns a random name.
If true, returns the PDF inline as base64; otherwise, returns a download URL.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
API2PDF_CHECK_STATUSTool 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.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
API2PDF_DELETE_PDFDelete 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.).
Input parameters
The ResponseId returned from a previous API2PDF operation (e.g., merge, convert). This UUID identifies the PDF file to delete from API2PDF storage.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
API2PDF_EXTRACT_PAGESTool 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.
Input parameters
Zero-based index of the last page to extract (exclusive). Negative values count from end. Defaults to end of document. When both start and end are 0 (or omitted), all pages are extracted.
URL of the source PDF (must start with http:// or https://).
Zero-based index of the first page to extract (inclusive). Negative values count from end (-1 is last page). Defaults to 0 (first page).
If true, returns the PDF inline; otherwise returns a download URL. Default is true.
Custom storage settings for uploading the extracted PDF file.
Desired filename for the extracted PDF (e.g., 'pages.pdf'). Random name if omitted.
Key-value object specifying headers when fetching the source PDF.
When true, upload the extracted PDF via the provided storage settings.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
API2PDF_LIBREOFFICE_PDF_TO_HTMLTool to convert a PDF document to HTML using LibreOffice. Use when you need HTML output of a PDF file (experimental; images may be excluded).
Input parameters
Direct URL to the source PDF file.
If true, returns HTML content inline in the JSON response; otherwise returns a URL.
Desired filename for the output HTML file (e.g., 'output.html').
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
API2PDF_LIBREOFFICE_THUMBNAILTool 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.
Input parameters
Direct URL to a publicly accessible PDF or Office document (Word, Excel, PowerPoint) to generate a thumbnail from.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
API2PDF_MERGE_PDFSMerge 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.
Input parameters
List of publicly accessible URLs pointing to PDF files to merge. The PDFs will be combined in the order they appear in this list.
If true, open the merged PDF in the browser; otherwise force download
Custom storage settings for uploading the merged PDF.
Desired filename for the merged PDF (e.g., 'output.pdf'). Random name if omitted
Optional headers to use when fetching each source PDF
When true, upload the merged PDF via the provided storage settings
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
API2PDF_OPTIMIZE_PDFTool 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.
Input parameters
URL of the PDF file to optimize. Must start with http:// or https://
If true, open the optimized PDF in a browser window. Defaults to True.
Custom storage options: method, url, extraHTTPHeaders. Required if useCustomStorage is true.
Filename for the output PDF. Random name if omitted.
Headers to include when fetching the source PDF.
Whether to use custom storage options (see `storage`). Defaults to False.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
API2PDF_REORDER_PAGESReorder 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.
Input parameters
URL of the source PDF to reorder (must start with http:// or https://).
List of zero-based page indices defining the new order. For example, \[2,0,1\] reorders a 3-page PDF to show page 3, then page 1, then page 2. Each index must be valid for the source PDF.
If true, returns the PDF inline; otherwise returns a download URL.
Custom storage settings for uploading the PDF file.
Desired filename for the reordered PDF (e.g., 'reordered.pdf'). Random name if omitted.
Key-value headers when fetching the source PDF.
When true, upload the final PDF via provided storage settings.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
API2PDF_ZEBRA_GENERATE_BARCODETool to generate barcodes or QR codes using Zebra Crossing (ZXING). Use when you need a barcode or QR code image from text values.
Input parameters
The text or data value to encode in the barcode. For 1D barcodes, this is typically alphanumeric. For QR codes, can include URLs, text, or other data.
Width of the generated barcode image in pixels. If not specified, uses the API default.
Barcode format to generate. Supported 1D formats: CODABAR, CODE_39, CODE_93, CODE_128, EAN_8, EAN_13, ITF, RSS_14, RSS_EXPANDED, UPC_A, UPC_E, UPC_EAN_EXTENSION. Supported 2D formats: AZTEC, DATA_MATRIX, MAXICODE, PDF_417, QR_CODE. Most commonly used: QR_CODE (for 2D) or CODE_128 (for 1D).
Height of the generated barcode image in pixels. If not specified, uses the API default.
When true, displays the human-readable text value below the barcode image. API default is false.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
No publicly available marketplace agent is found using this tool yet. There are 78 agents privately built on Nagent that already use API2PDF.
Build on Nagent
Connect API2PDF to any Nagent agent in minutes — no API key management, no boilerplate. Just configure and deploy.
The five questions agent builders ask before adopting a new integration.
Open the External Integrations panel inside Nagent (app.nagent.ai/externalIntegration), find API2PDF, and click "Connect Now." You'll authenticate with an API key — Nagent handles credential storage and refresh automatically. Once connected, API2PDF is available to any agent in your workspace.
No. Nagent provides no-code integration for every tool. Once API2PDF is connected, you configure its 10 actions directly in the agent builder UI — no API calls, no boilerplate, no schema management.
Helix — Nagent's agentic agent builder — lets you drop API2PDF steps into any workflow visually. Pick an action (e.g., one of those listed above), fill in the inputs (Helix knows the required vs. optional schema for each parameter), and connect it to upstream/downstream steps. Triggers run as the entry point of an agent, so when a API2PDF event fires, the agent kicks off automatically.
Every API2PDF action and trigger ships with a fully-typed schema — input parameters with name, type, required flag, and description, plus the output payload shape. The schemas are documented in the sections above. Helix uses these schemas to validate your configuration at build time and to type-check the data flowing between steps.
Yes. While API2PDF ships with 10 pre-built documents actions, you can layer custom logic around them inside Helix — pre/post-processing steps, conditional branches, retries, or stitching API2PDF together with other connected tools. For deeper customization, talk to our team about Nagent's Agentic AI Lab — forward-deployed engineers who build API2PDF-based workflows tailored to your business.