Skip to main content
API2PDF logo
  • Category: documents
  • Auth: API_KEY
  • Composio-managed OAuth available? N/A
  • Tools: 10
  • Triggers: 0
  • Slug: API2PDF
  • Version: 20261101_00

Tools

Slug: 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

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: 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

string
required
The ResponseId returned from a previous API2PDF operation (e.g., merge, convert). This UUID identifies the PDF file to delete from API2PDF storage.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: 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

integer
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.
string
required
URL of the source PDF (must start with http:// or https://).
integer
Zero-based index of the first page to extract (inclusive). Negative values count from end (-1 is last page). Defaults to 0 (first page).
boolean
If true, returns the PDF inline; otherwise returns a download URL. Default is true.
object
Custom storage settings for uploading the extracted PDF file.
string
Desired filename for the extracted PDF (e.g., ‘pages.pdf’). Random name if omitted.
object
Key-value object specifying headers when fetching the source PDF.
boolean
When true, upload the extracted PDF via the provided storage settings.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: 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

string
required
Direct URL to the source PDF file.
boolean
If true, returns HTML content inline in the JSON response; otherwise returns a URL.
string
Desired filename for the output HTML file (e.g., ‘output.html’).

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: 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

string
required
Direct URL to a publicly accessible PDF or Office document (Word, Excel, PowerPoint) to generate a thumbnail from.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: 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

array
required
List of publicly accessible URLs pointing to PDF files to merge. The PDFs will be combined in the order they appear in this list.
boolean
If true, open the merged PDF in the browser; otherwise force download
object
Custom storage settings for uploading the merged PDF.
string
Desired filename for the merged PDF (e.g., ‘output.pdf’). Random name if omitted
object
Optional headers to use when fetching each source PDF
boolean
When true, upload the merged PDF via the provided storage settings

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: 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

string
required
URL of the PDF file to optimize. Must start with http:// or https://
boolean
If true, open the optimized PDF in a browser window. Defaults to True.
object
Custom storage options: method, url, extraHTTPHeaders. Required if useCustomStorage is true.
string
Filename for the output PDF. Random name if omitted.
object
Headers to include when fetching the source PDF.
boolean
Whether to use custom storage options (see storage). Defaults to False.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: API2PDF_REORDER_PAGESReorder pages of a PDF using a source URL and a list of zero-based page indices in the desired order. It extracts each requested page into an intermediate PDF before merging them; generated files are normally deleted after 24 hours.

Input Parameters

string
required
URL of the source PDF to reorder (must start with http:// or https://).
array
required
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.
boolean
If true, returns the PDF inline; otherwise returns a download URL.
object
Custom storage settings for uploading the PDF file.
string
Desired filename for the reordered PDF (e.g., ‘reordered.pdf’). Random name if omitted.
object
Key-value headers when fetching the source PDF.
boolean
When true, upload the final PDF via provided storage settings.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: API2PDF_ZEBRA_GENERATE_BARCODERequest a barcode or QR code for a text value using ZXing. The tool sends a GET request and returns the raw response body as image bytes.

Input Parameters

string
required
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.
integer
Width of the generated barcode image in pixels. If not specified, uses the API default.
string
required
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).
integer
Height of the generated barcode image in pixels. If not specified, uses the API default.
boolean
When true, displays the human-readable text value below the barcode image. API default is false.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not