Actions42
- Bulk Render Actions
- Document Actions
- Document Tool Actions
- File Actions
- Render Actions
Document Tool → Compress
AI-generatedSummary
Compresses a PDF file
Inputs
- fileId (required) — ID of the file uploaded via the File resource.
- level — Compression level: low, medium, or high.
- waitForCompletion — Whether to wait for the tool job to complete before returning.
- downloadOutput — Whether to automatically download the output file as binary data after completion. Only applicable when waitForCompletion is true.
Output shape
If downloadOutput is true and the job completes, returns the compressed PDF as binary data; otherwise returns the tool job status as JSON data.
Binary output includes fileName and mimeType; JSON output contains the API response body.
Examples
Example 1: Compress a PDF with medium compression and auto-download output
fileId: 'abc123', level: 'medium', waitForCompletion: true, downloadOutput: true