API2PDF
api2pdfApi2Pdf 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.
Acciones disponibles (9)
Cada acción es una operación que el agente puede ejecutar contra este conector. Haz clic en una acción para ver sus parámetros.
Add Header FooterAPI2PDF_ADD_HEADER_FOOTERAcciónTool to add headers and footers to a pdf document. use when you need consistent page numbering, titles, or custom branding on every page.
API2PDF_ADD_HEADER_FOOTERAcciónTool to add headers and footers to a pdf document. use when you need consistent page numbering, titles, or custom branding on every page.
Parámetros de entrada
htmlstringObligatorioRaw HTML content to convert into a PDF. Must include any page structure needed.
optionsobjectAdvanced options for header and footer display in the PDF.
fileNamestringDesired filename for the generated PDF (e.g., 'report.pdf'). If omitted, the API assigns a random name.
inlinePdfbooleanIf true, returns the PDF inline as base64; otherwise, returns a download URL.
Parámetros de salida
dataobjectObligatorioData from the action execution
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
Delete PDFAPI2PDF_DELETE_PDFAcciónTool to delete a previously generated pdf. use when you need to immediately remove a pdf by its response id.
API2PDF_DELETE_PDFAcciónTool to delete a previously generated pdf. use when you need to immediately remove a pdf by its response id.
Parámetros de entrada
response_idstringObligatorioUnique identifier of the PDF to delete.
Parámetros de salida
dataobjectObligatorioData from the action execution
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
Extract PDF PagesAPI2PDF_EXTRACT_PAGESAcciónTool to extract specific pages from a pdf document. use when you need only certain pages from a larger pdf file.
API2PDF_EXTRACT_PAGESAcciónTool to extract specific pages from a pdf document. use when you need only certain pages from a larger pdf file.
Parámetros de entrada
endintegerZero-based index of the last page to extract. Negative values count from end. Defaults to last page.
urlstringObligatoriouriURL of the source PDF (must start with http:// or https://).
startintegerZero-based index of the first page to extract. Negative values count from end (-1 is last page). Defaults to first page.
inlinebooleanIf true, returns the PDF inline; otherwise returns a download URL. Default is true.
fileNamestringDesired filename for the extracted PDF (e.g., 'pages.pdf'). Random name if omitted.
extraHTTPHeadersobjectKey-value object specifying headers when fetching the source PDF.
Parámetros de salida
dataobjectObligatorioData from the action execution
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
LibreOffice PDF to HTMLAPI2PDF_LIBREOFFICE_PDF_TO_HTMLAcciónTool 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_PDF_TO_HTMLAcciónTool to convert a pdf document to html using libreoffice. use when you need html output of a pdf file (experimental; images may be excluded).
Parámetros de entrada
urlstringObligatoriouriDirect URL to the source PDF file.
inlinebooleanIf true, returns HTML content inline in the JSON response; otherwise returns a URL.
fileNamestringDesired filename for the output HTML file (e.g., 'output.html').
Parámetros de salida
dataobjectObligatorioData from the action execution
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
LibreOffice ThumbnailAPI2PDF_LIBREOFFICE_THUMBNAILAcciónTool 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_LIBREOFFICE_THUMBNAILAcciónTool 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.
Parámetros de entrada
urlstringObligatoriouriDirect URL to the PDF or Office document to thumbnail.
Parámetros de salida
dataobjectObligatorioData from the action execution
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
Merge PDFsAPI2PDF_MERGE_PDFSAcciónTool to merge multiple pdf documents into a single pdf. use when you need to concatenate several pdfs on the server-side.
API2PDF_MERGE_PDFSAcciónTool to merge multiple pdf documents into a single pdf. use when you need to concatenate several pdfs on the server-side.
Parámetros de entrada
urlsstring[]ObligatorioList of URLs pointing to the PDFs to merge
inlinebooleanIf true, open the merged PDF in the browser; otherwise force download
storageobjectCustom storage settings for uploading the merged PDF.
fileNamestringDesired filename for the merged PDF (e.g., 'output.pdf'). Random name if omitted
extraHTTPHeadersobjectOptional headers to use when fetching each source PDF
useCustomStoragebooleanWhen true, upload the merged PDF via the provided storage settings
Parámetros de salida
dataobjectObligatorioData from the action execution
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
Optimize PDFAPI2PDF_OPTIMIZE_PDFAcciónTool 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_OPTIMIZE_PDFAcciónTool 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.
Parámetros de entrada
urlstringObligatoriouriURL of the PDF file to optimize. Must start with http:// or https://
inlinebooleanIf true, open the optimized PDF in a browser window. Defaults to True.
storageobjectCustom storage options: method, url, extraHTTPHeaders. Required if useCustomStorage is true.
fileNamestringFilename for the output PDF. Random name if omitted.
extraHTTPHeadersobjectHeaders to include when fetching the source PDF.
useCustomStoragebooleanWhether to use custom storage options (see `storage`). Defaults to False.
Parámetros de salida
dataobjectObligatorioData from the action execution
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
Reorder PDF PagesAPI2PDF_REORDER_PAGESAcciónTool to reorder pages of a pdf document. use when you need to rearrange pages into a new order by specifying page indices.
API2PDF_REORDER_PAGESAcciónTool to reorder pages of a pdf document. use when you need to rearrange pages into a new order by specifying page indices.
Parámetros de entrada
urlstringObligatoriouriURL of the source PDF to reorder (must start with http:// or https://).
pagesinteger[]ObligatorioList of zero-based page indices defining the new order (e.g., [2,0,1] for pages 3,1,2].
inlinebooleanIf true, returns the PDF inline; otherwise returns a download URL.
storageobjectCustom storage settings for uploading the PDF file.
fileNamestringDesired filename for the reordered PDF (e.g., 'reordered.pdf'). Random name if omitted.
extraHTTPHeadersobjectKey-value headers when fetching the source PDF.
useCustomStoragebooleanWhen true, upload the final PDF via provided storage settings.
Parámetros de salida
dataobjectObligatorioData from the action execution
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
Generate Barcode or QR CodeAPI2PDF_ZEBRA_GENERATE_BARCODEAcciónTool to generate barcodes or qr codes using zebra crossing (zxing). use when you need a barcode or qr code image from text values.
API2PDF_ZEBRA_GENERATE_BARCODEAcciónTool to generate barcodes or qr codes using zebra crossing (zxing). use when you need a barcode or qr code image from text values.
Parámetros de entrada
valuestringObligatorioThe text value to encode in the barcode or QR code.
widthintegerWidth of the generated image in pixels.
formatstringObligatorioBarcode format to generate. Most common values: CODE_39 or QR_CODE.
heightintegerHeight of the generated image in pixels.
showlabelbooleanIf true, display the human-readable text label below the barcode image.
Parámetros de salida
dataobjectObligatorioData from the action execution
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not