Actions80
- Extract Text From Word
- Find And Replace Text
- Convert PDF To Editable PDF Using OCR
- Create Swiss QR Bill
- Split PDF By Barcode
- Split PDF By Swiss QR
- Split PDF By Text
- Split PDF Regular
- Create PDF/A
- Convert HTML To PDF
- Convert Markdown To PDF
- Upload File To PDF4me
- Add Attachment To PDF
- Add Barcode To PDF
- Add Form Fields To PDF
- Fill PDF Form
- Add HTML Header Footer
- Add Image Stamp To PDF
- Add Margin To PDF
- Add Page Number To PDF
- Add Text Stamp To PDF
- AI-Invoice Parser
- AI-Process HealthCard
- AI-Process Contract
- Generate Barcode
- Classify Document
- Parse Document
- Linearize PDF
- Flatten PDF
- Convert To PDF
- Json To Excel
- Convert PDF To Excel
- Convert PDF To Word
- Convert PDF To PowerPoint
- Convert VISIO
- Crop Image
- Delete Blank Pages From PDF
- Delete Unwanted Pages From PDF
- Extract Pages
- Merge Multiple PDFs
- Overlay PDFs
- Rotate Document
- Rotate Page
- Sign PDF
- URL to PDF
- Add Image Watermark To Image
- Add Text Watermark To Image
- Compress Image
- Convert Image Format
- Create Images From PDF
- Flip Image
- Get Image Metadata
- Image Extract Text
- Remove EXIF Tags From Image
- Replace Text With Image
- Replace Text With Image In Word
- Resize Image
- Rotate Image
- Rotate Image By EXIF Data
- Compress PDF
- Get PDF Metadata
- Repair PDF Document
- Get Document From Pdf4me
- Update Hyperlinks Annotation
- Protect Document
- Unlock PDF
- Disable Tracking Changes In Word
- Enable Tracking Changes In Word
- Generate Document Single
- Generate Documents Multiple
- Get Tracking Changes In Word
- Read Barcode From Image
- Read Barcode From PDF
- Read SwissQR Code
- Extract Form Data From PDF
- Extract Pages From PDF
- Extract Attachment From PDF
- Extract Text By Expression
- Extract Table From PDF
- Extract Resources
Overview
This node provides PDF compression functionality as part of a broader PDF and image processing toolset. Specifically, the "Compress PDF" operation reduces the file size of PDF documents to optimize them for different use cases such as web publishing, printing, or screen viewing.
Common scenarios where this node is beneficial include:
- Reducing PDF file sizes before sending via email or uploading to websites.
- Optimizing PDFs for faster loading on web pages.
- Preparing PDFs for high-quality print with balanced compression.
- Archiving large numbers of PDFs efficiently by compressing them.
Practical example: You have scanned contracts saved as large PDFs and want to reduce their size for easier sharing without losing too much quality. Using this node's Compress PDF operation, you can input the original PDF (via binary data, base64 string, or URL), select an optimization profile, and get a compressed PDF output ready for distribution.
Properties
| Name | Meaning |
|---|---|
| Input Data Type | Choose how to provide the PDF file to compress. Options: Binary Data, Base64 String, URL. |
| Input Binary Field | Name of the binary property containing the PDF file (used if Input Data Type is Binary Data). |
| Base64 PDF Content | Base64 encoded PDF content (used if Input Data Type is Base64 String). |
| PDF URL | URL to the PDF file to compress (used if Input Data Type is URL). |
| Output File Name | Name for the output compressed PDF file. |
| Optimize Profile | Optimization profile for compression. Options: Web, Print, Screen. |
| Async | Enable asynchronous processing (true/false). |
Output
The node outputs JSON data representing the compressed PDF file. The main output includes:
- A binary property containing the compressed PDF file data, named according to the workflow's conventions.
- The JSON output may also include metadata about the compression process or file details depending on implementation.
If the node supports binary data output, it will provide the compressed PDF in binary form suitable for saving or passing to subsequent nodes.
Dependencies
- Requires access to an external PDF processing service or API capable of compressing PDF files.
- Needs appropriate API authentication credentials configured in n8n to authorize requests.
- Network access to fetch PDFs from URLs if that input method is used.
- No additional environment variables are explicitly required beyond standard API credential setup.
Troubleshooting
Common issues:
- Providing an invalid or inaccessible URL for the PDF file will cause errors fetching the document.
- Incorrectly specifying the binary property name when using binary input will result in missing input data.
- Using an unsupported or corrupted PDF file format may cause compression failures.
- Insufficient permissions or invalid API credentials will lead to authorization errors.
Error messages and resolutions:
- "Input binary property not found": Verify the binary field name matches the previous node's output.
- "Failed to fetch PDF from URL": Check the URL is correct, publicly accessible, and uses HTTPS if required.
- "Compression service authorization failed": Confirm API credentials are valid and properly configured.
- "Unsupported PDF format": Ensure the input PDF is not corrupted and conforms to standard PDF specifications.