Actions19
- AI Invoice Parser
- URL/HTML to PDF
- Merge PDF
- Split PDF
- Convert To PDF
- Convert From PDF
- Add Text/Images to PDF
- Fill a PDF Form
- PDF Information & Form Fields
- Compress PDF
- PDF Security
- Rotate PDF Pages
- Delete PDF Pages
- Search in PDF
- Search & Replace Text or Delete
- Barcode Reader
- Barcode Generator
- Make PDF Searchable or Unsearchable
- Upload File
Convert To PDF
AI-generatedOverview
This node converts various file types to PDF format using the PDF.co service. It supports converting CSV, document files (RTF, DOC, DOCX, TXT), email files (MSG, EML), image files (JPG, PNG, TIFF), and Excel files (XLS, XLSX) to PDF. Users provide the source file URL and select the conversion type. Advanced options allow customization such as setting output file name, worksheet index for Excel files, embedding email attachments, setting PDF margins, orientation, paper size, and more. This node is useful for automating document conversions in workflows, such as generating PDFs from reports, emails, images, or spreadsheets for archiving, sharing, or further processing.
Use Case Examples
- Convert a DOCX document from a public URL to PDF for easy sharing.
- Convert an Excel XLSX file to PDF, specifying the worksheet index to convert only a specific sheet.
- Convert an email file (EML) to PDF, embedding attachments and customizing paper size and orientation.
Properties
| Name | Meaning |
|---|---|
| Authentication | Select the authentication method to use for the PDF.co API (API Key or OAuth2). |
| Convert Type | Select the type of file conversion to PDF (CSV, Document, Email, Image, XLS, XLSX). |
| Source File URL of the File to Convert | The direct URL of the file to convert. Must be publicly accessible. |
| Worksheet Index | The index of the worksheet to convert (for XLS and XLSX files). |
| Advanced Options (Common) | Additional options for document, XLS, XLSX, and image conversions, including custom output file name, callback URL, output link expiration, HTTP authentication for source URL, and custom PDF processing profiles. |
| Advanced Options (CSV) | Additional options specific to CSV to PDF conversion, including auto sizing, custom file name, callback URL, output link expiration, HTTP authentication, and custom profiles. |
| Advanced Options (Email) | Additional options specific to email to PDF conversion, including embedding attachments, converting attachments to PDF, margins, orientation, paper size, custom paper size, custom file name, callback URL, output link expiration, and custom profiles. |
Output
JSON
url- The URL of the generated PDF file.base64- Base64 encoded string of the generated PDF file (if requested).fileName- The name of the output PDF file.
Dependencies
- PDF.co API key or OAuth2 credentials
Troubleshooting
- Ensure the source file URL is publicly accessible and correct to avoid file download errors.
- Check authentication credentials (API key or OAuth2) if the API call fails due to authorization errors.
- Verify that the selected convert type matches the source file format to prevent conversion errors.
- If using HTTP authentication for the source URL, ensure the username and password are correct.
- Review the custom profiles JSON syntax carefully to avoid processing errors.
Links
- PDF.co Convert to PDF Integration Guide - Official guide for using the Convert to PDF operation in n8n with PDF.co.
- PDF.co Custom Profile Guide - Documentation on customizing PDF processing options using JSON profiles.