Actions20
- Document Management Actions
- PDF to Format Actions
- Format to PDF Actions
- Security & Signing Actions
Document Management → Compress PDF
AI-generatedSummary
Compress a PDF file to reduce its file size while maintaining quality, accepting input either via a public URL or binary data from a previous node.
Inputs
- Input Method (required) — Specify how to provide the input PDF: 'binary' to use binary data from a prior node, or 'url' to fetch the file from a public URL (URL is recommended for AI tool usage).
- File URL — Public URL of the PDF file to process; required if Input Method is 'url'.
- Input Binary Property — Name of the binary property containing the input PDF file if Input Method is 'binary'. Defaults to 'data'.
- Output Type (required) — How to return the compressed file: as 'binary' data in the node output or as a temporary download 'url' (valid for 1 hour; URL recommended for AI tool usage).
- Output Binary Property — Name of the binary property to store the output file when Output Type is 'binary'. Defaults to 'data'.
Output shape
a single item containing either the compressed PDF file as binary data or a JSON object with a temporary download URL.
If Output Type is 'binary', the node returns the compressed PDF in the specified binary property with metadata including success flag, filename ('compressed.pdf'), and file size. If Output Type is 'url', the node returns a JSON with a downloadUrl valid for 1 hour, success flag, filename, and file size. Only one input file can be compressed per execution.
Examples
Example 1: Using a public URL input with output as a download URL
Set Input Method to 'URL', provide a public PDF URL, and set Output Type to 'URL'. The node returns a JSON containing a temporary download URL for the compressed PDF.
Example 2: Using binary input with binary output
Set Input Method to 'Binary Data', specify the binary property name containing the PDF file from a previous node, and set Output Type to 'Binary Data'. The node returns the compressed PDF as binary data under the output binary property.