Pdf4me connects to a Nagent workspace with an API key. Once it is connected, agents can call 4 Pdf4me actions, such as "Convert to PDF", "Extract Text from PDF" and "Fill PDF Form". Nothing is enabled on connect: each action is allowed one at a time, and an action with side effects runs or waits for a person according to the agent's level.
Every operation an agent can call against Pdf4me, with input parameters and output schema.
PDF4ME_CONVERT_TO_PDFTool to convert various document and image formats to PDF. Handles one file per call; multi-file PDFs require multiple calls followed by a separate merge step. Conversion permanently removes interactive form field editability — retain the original file as backup, and ensure all form fields are populated before converting. Use when you need to transform base64-encoded files into PDFs before further processing.
Input parameters
Document object with base64 data and optional filename. Must include `docData` field containing base64-encoded file bytes — URLs and file paths will fail validation.
List of conversion option sets. If omitted, default conversion is applied.
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
PDF4ME_EXTRACT_TEXTTool to extract embedded text from text-based PDFs using PDF4me's ExtractResources endpoint. Use when you need to retrieve searchable text content from PDFs for analysis or processing. This tool does not perform OCR; for scanned or image-only PDFs, use OCR endpoints instead.
Input parameters
Base64-encoded PDF file content from which to extract text.
PDF file name with .pdf extension for document identification.
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
PDF4ME_FILL_PDF_FORMTool to fill PDF form fields programmatically using JSON or XML data. Use when you need to generate reports or populate forms from various data sources with mail merge functionality. Supports filling multiple documents from a list of data collection items.
Input parameters
Additional metadata string for the form filling operation.
Stringified JSON array of field data objects to fill. Must be a JSON string, not a JSON array object. Example: '\[{"Name":"John Doe","Email":"john@example.com"}\]'
Output format specification. Typically 'PDF' for PDF output.
Metadata in JSON string format for advanced configuration.
Array of form data objects with field name-value pairs matching PDF form fields. Each object contains key-value pairs where keys are form field names and values are the data to fill. Example: \[{"Name":"John Doe","Email":"john@example.com"}\]
Data type for input data. Use 'JSON' for JSON data or 'XML' for XML data.
PDF template filename with .pdf extension to be filled.
Base64-encoded PDF form template content.
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
PDF4ME_READ_BARCODES_FROM_IMAGETool to read and extract barcode or QR code data from image files (JPG/PNG). Use when you need to decode barcodes from images for data extraction or verification. Supports various barcode types including QR codes, Code128, DataMatrix, and more.
Input parameters
Image file name with extension (e.g., 'barcode.png', 'scan.jpg').
Image file format: jpg or png.
Base64-encoded image file content containing barcodes to be read.
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
Agents can call 4 Pdf4me actions on Nagent, including "Convert to PDF", "Extract Text from PDF" and "Fill PDF Form". Convert to PDF: Convert various document and image formats to PDF. Each action is listed on this page with its input parameters and its output.
Pdf4me connects with an API key, under your workspace's own connection. Nothing is enabled on connect: each action is allowed one at a time and can be scoped to the agents that need it.
Convert to PDF takes 1 required input: document. It also takes 1 optional input: pdfConvertActions. It returns data, error and successful.