Actions132
- AI Actions
- Extract Text From Document
- Check Content Policy
- Detect Adult Content
- Detect Brand
- Detect Color
- Detect Email Type
- Detect Faces
- Extract Entities
- Extract Contact Information
- Extract Customizable Information From Text
- Fuzzy Text Matcher
- Generate Image
- Generate JavaScript Code
- Generate Python Code
- Detect Language
- Detect Mood
- Extract Text From PDF
- Recognize Objects in Image
- Extract Text From Image
- Redact Sensitive Information From PDF
- Remove Background Image
- Summarize Text
- Transcribe
- Translate Text
- Image Actions
- Business Actions
- Convert Actions
- Generate Actions
- Crypto Actions
- Operator Actions
- Storage Actions
- Scheduler Actions
- Text Actions
- Chart Actions
- Code Actions
- Calculate Actions
- Date and Time Actions
- PDF Actions
- Compress PDF File
- Count PDF Pages
- Create Empty PDF
- Decrypt PDF
- Convert DOCX to PDF
- Draw Image on PDF
- Draw Text on PDF
- Encrypt PDF
- Convert HTML to PDF
- Convert Markdown to PDF
- Manage PDF Metadata
- Merge PDF Files
- Add PDF Pages
- Remove PDF Pages
- Resize PDF Pages
- Rotate PDF Pages
- Convert PDF to Base64
- Convert PDF to Image
- Split PDF File
- Add Image Watermark to PDF
- Add Text Watermark to PDF
- Shortened URL Actions
PDF → Compress PDF File
AI-generatedOverview
The node provides a utility to compress PDF files. It accepts either a public URL of a PDF or the binary buffer data of a PDF file as input, compresses the PDF to reduce its size, and then outputs the compressed PDF. Users can choose whether to receive the compressed PDF as a downloadable URL or as raw data.
This node is beneficial in scenarios where users need to optimize PDF files for faster sharing, reduced storage usage, or improved loading times on websites or applications. For example, it can be used to compress large PDF reports before emailing them or uploading to cloud storage.
Properties
| Name | Meaning |
|---|---|
| PDF URL | Public URL of the PDF file to compress. |
| PDF Buffer | Binary buffer data of the PDF file to compress. |
| Return as URL | Whether to return the compressed PDF as a downloadable URL (true) or as raw data (false). |
| File Name | Desired name for the output compressed PDF file. |
Output
The node outputs the compressed PDF file. Depending on the "Return as URL" property:
- If
true, the output JSON contains a URL from which the compressed PDF can be downloaded. - If
false, the output includes the compressed PDF data directly (likely as binary data).
The exact structure of the output JSON is not detailed in the source, but it will contain either a URL string or the binary content representing the compressed PDF.
Dependencies
- Requires an API key credential for authentication with the external 0CodeKit service.
- The node sends a POST request to the
/pdf/compressendpoint of the 0CodeKit API athttps://prod.0codekit.com. - No additional environment variables are explicitly required beyond the API key credential.
Troubleshooting
Common issues:
- Providing both PDF URL and PDF Buffer empty or invalid will likely cause errors.
- Network connectivity problems may prevent access to the external API.
- Incorrect or missing API key credential will result in authentication failures.
- If "Return as URL" is set to true but the service fails to generate a URL, the output might be empty or error out.
Error messages:
- Authentication errors indicate invalid or missing API credentials; verify and re-enter the API key.
- Validation errors if neither PDF URL nor buffer is provided; ensure one valid input is given.
- API response errors related to file format or size limits; check that the input PDF meets service requirements.
Links and References
- 0CodeKit API Documentation (assumed base URL for API calls)
- General information on PDF compression techniques: https://en.wikipedia.org/wiki/PDF_compression