Actions114
- AI Actions
- AI Advanced OCR
- Check Content Policy
- Detect Adult Content
- Detect Brand
- Detect Color
- Detect Email Type
- Detect Faces
- Enitity Detection
- Extract Contact Information
- Extract Customizable Information From Text
- Fuzzy Text Matcher
- Generate Image
- Generate Javascript Code
- Generate Python Code
- Language Detection
- Mood Detection
- PDF OCR
- Picture Object Recognition
- Picture Text Recognition
- Redact Sensitive Information From PDF
- Too Long To Read
- Transcribe
- Translation
- Business Actions
- Calculate Actions
- Code Actions
- Convert Actions
- Crypto Actions
- Date & Time Actions
- Generate Actions
- Image Actions
- Operator Actions
- PDF Actions
- Storage Actions
- Text Actions
- User Actions
PDF → Compress PDF
AI-generatedOverview
This node operation compresses PDF files. It supports input PDFs provided either as a URL or as binary data (buffer). Users can specify the filename for the output PDF and choose whether to receive the compressed PDF as a URL or as binary data. This operation is useful for reducing the file size of PDFs to save storage space or facilitate faster sharing and uploading.
Use Case Examples
- Compress a PDF file available at a public URL and get the compressed PDF as a downloadable URL.
- Compress a PDF file provided as binary data and receive the compressed PDF as binary output for further processing.
Properties
| Name | Meaning |
|---|---|
| Code Variables | Variables defined in the code editor for the selected function, used to pass dynamic values during execution. |
| Get File as URL | Whether to receive the compressed PDF as a URL. |
| Filename | Filename of the PDF file. |
| URL or Binary Data | Specifies if the input PDF is provided as a URL or as binary data (buffer). |
| URL | Public URL of the PDF file (used if input type is URL). |
| Binary Data | Buffer of the PDF file (used if input type is binary data). |
| Pages | Pages inside the PDF file (optional, used when input is binary data). |
Output
JSON
compressedPdfUrl- URL of the compressed PDF file if 'Get File as URL' is true.compressedPdfBuffer- Binary data buffer of the compressed PDF if 'Get File as URL' is false.
Dependencies
- An API key credential for the CodeKit API is required to authenticate requests.
Troubleshooting
- Ensure the input PDF URL is publicly accessible if using URL input type.
- Verify that the binary data buffer is correctly formatted if using binary input.
- Check that the filename is provided if required by downstream processes.
- If the node throws an error related to authentication, verify that the API key credential is correctly configured.