1. Tasks
  2. PDF Tools

Tasks

PDF Tools

Converts, splits, merges, OCRs, extracts from, and inspects PDF files. Useful for document preparation, data extraction, and file processing in Stubber workflows.

The PDF Tools task runs one PDF function on one or more files. The function parameter selects what to do, for example pdf_to_text or merge_pdfs, and each function has its own parameters.

Example PDF Tool

loading...

Parameters

files
required
array

The files on which to perform the PDF function. Each item is a file object, for example a file uploaded on a form field such as ~~stubpost.data.pdf_file.0.


function
required
string

The function that is to be performed on the PDF files. See the list of PDF Tools below.


timeout_seconds
optional
number

How long to wait for the function to finish, in seconds. Defaults to 300. Large files and OCR can take longer.


Result

Running a PDF Tool performs the function on the files and returns the newly created files in files and attachments, including their fileuuid, filename, and contentType. Functions that create more than one file, such as splitting a PDF, return every file.

In the case of Get PDF Details, the details of the file are returned in pdf_details as no new file is created.

A run that fails, for example because of an invalid parameter or a wrong password, returns an error and no files.

List of PDF Tools