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
The node provides a "Linearize PDF" operation that optimizes PDF files for faster and more efficient web viewing or printing. Linearization rearranges the internal structure of a PDF to enable progressive loading, meaning pages can be displayed before the entire file is downloaded. This is especially useful for large PDFs accessed over the internet.
Common scenarios include:
- Preparing PDFs for online distribution where quick page rendering improves user experience.
- Optimizing PDFs for printing with specific quality or compression profiles.
- Reducing file size while maintaining acceptable quality for storage or sharing.
Practical example: A marketing team wants to publish a product catalog as a PDF on their website. Using this node's linearization with a "Web" profile ensures visitors can start reading pages immediately without waiting for the full download.
Properties
| Name | Meaning |
|---|---|
| Input Data Type | Choose how to provide the PDF file to linearize. Options: • Binary Data (from previous node) • Base64 String (direct base64 encoded content) • URL (link to PDF file) |
| 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 string of the PDF document content (used if Input Data Type is Base64 String). |
| PDF URL | URL pointing to the PDF file to linearize (used if Input Data Type is URL). |
| Output File Name | Desired filename for the output linearized PDF file. Default is "linearized_document.pdf". |
| Document Name | Name of the source PDF file for reference purposes. Default is "document.pdf". |
| Optimization Profile | Selects the optimization profile for linearization. Options include: • Web (fast loading, progressive display) • Max (maximum compression) • Print (optimized for printing quality) • Default (balanced) • WebMax, PrintMax, PrintGray, Compress, CompressMax (various specialized compressions and optimizations) |
| Advanced Options | Additional settings: • Custom Profiles: JSON string to customize API call properties. • Use Async Processing: Boolean to enable asynchronous processing, recommended for large files. |
Output
The node outputs the linearized PDF file in binary format within the binary property of the output item. The binary data represents the optimized PDF ready for use or further processing.
The json output field typically contains metadata or status information related to the linearization process but primarily the main output is the binary PDF file.
Dependencies
- Requires access to an external PDF processing service API capable of performing PDF linearization.
- Needs proper API authentication configured in n8n (e.g., an API key credential).
- Network access to fetch PDF files if using URL input type.
- Optional asynchronous processing support for handling large files efficiently.
Troubleshooting
Issue: Node fails when providing a URL input.
Cause: The URL might be inaccessible, incorrect, or requires authentication.
Resolution: Verify the URL is publicly accessible and correct. If authentication is needed, consider downloading the file beforehand or using binary input.Issue: Output PDF is not linearized or corrupted.
Cause: Input PDF may be malformed or incompatible.
Resolution: Validate the source PDF integrity. Try different optimization profiles or re-generate the source PDF.Issue: Long processing times or timeouts on large files.
Cause: Synchronous processing of large PDFs can be slow.
Resolution: Enable "Use Async Processing" option to improve performance.Error Messages:
- Authentication errors indicate missing or invalid API credentials. Ensure credentials are correctly set up.
- File format errors suggest the input is not a valid PDF; check input data type and content.
Links and References
- PDF Linearization Explanation (Adobe PDF specification section on linearized PDFs)
- PDF4me API Profiles Documentation — for customizing advanced options
- General info on PDF optimization: https://www.pdfa.org/resource/linearized-pdf/