Skip to main content

Convert to PDF using n8n action

PDF4me Convert to PDF transforms documents from various formats into high-quality PDF files through n8n automation workflows. Process Word (.docx), Excel (.xlsx), PowerPoint (.pptx), images (.jpg, .png), and other formats via n8n triggers, binary data, base64 strings, or public URLs to generate PDFs with preserved formatting, embedded fonts, original layouts, image quality, and professional styling. This solution is ideal for document archiving, compliance reporting, standardized document delivery, email attachments, content publishing, and automated PDF generation workflows that require reliable multi-format conversion with consistent output quality and seamless integration.

Setup

Add the PDF4me "Convert to PDF" node to your n8n workflow and configure the required parameters. For initial setup instructions, see our n8n Integration Guide.

Prerequisites:

  • PDF4me API credentials
  • n8n workflow access

Configuration:

  1. Add PDF4me node to workflow
  2. Select "Convert to PDF" action
  3. Configure input parameters (see below)
Convert to PDF

Parameters

Complete list of parameters for the Convert to PDF action. Configure these parameters to control document to PDF conversion.

Important: Parameters marked with an asterisk (***) are required and must be provided for the action to function correctly.

ParameterTypeDescriptionExample
Input Data Type***StringDocument Input Format Selection
• Choose the format of your document data input
• PDF4me supports multiple input types
• Options: Binary Data, Base64 String, or URL
Binary Data
Input Binary FieldBinaryBinary Document File Input (Required if Binary Data)
• Reference document file from previous n8n node or file upload
• Supports: .docx, .pptx, .xlsx, .png and other formats
• Required when Input Data Type is "Binary Data"
{{ $binary.data }}
Base64 Document ContentStringBase64 Encoded Document Input (Required if Base64 String)
• Provide document data as base64 encoded string
• PDF4me automatically decodes and processes the content
• Required when Input Data Type is "Base64 String"
UEsDBBQABgAI...
File URLStringPublic File URL Input (Required if URL)
• Provide a public/open permission URL to the document file
• PDF4me downloads and processes the file from URL
• Required when Input Data Type is "URL"
https://abc.com/sample.docx
Input File Name***StringInput Document Filename
• Specify the name of the input document file
• Must include proper extension (.docx, .pptx, .xlsx, .png)
• PDF4me uses this for format detection and processing
document.docx
Output File Name***StringPDF Output Filename
• Specify the name for the generated PDF file
• Must include .pdf extension
• PDF4me ensures unique naming and format validation
output.pdf
Binary Data Output Name***StringBinary Data Output Mapping
• Define the variable name for accessing generated PDF binary data
• Used in subsequent workflow actions
• Essential for workflow automation
data

Advanced Options

The following parameters are available in the Advanced Options section and are optional:

ParameterTypeDescriptionExample
Custom ProfilesStringCustom Configuration Profiles
• Set additional options using custom profiles
• JSON-like format containing predefined parameters
• Enables advanced PDF generation settings
• Optional for specialized requirements
{ "outputDataFormat": "base64" }

Output

Output Parameters

ParameterTypeDescriptionExample
fileNameStringPDF4me generated PDF filename - The complete filename of the successfully generated PDF document with proper .pdf extension. PDF4me ensures unique naming and validates file format compliance for seamless integration with downstream processesoutput.pdf
mimeTypeStringPDF4me MIME type identifier - The standardized MIME type for the generated PDF file, always set to application/pdf by PDF4me's conversion engine. This ensures proper file handling and recognition across all systems and applicationsapplication/pdf
fileSizeNumberPDF4me PDF file size in bytes - The exact size of the generated PDF file in bytes, provided by PDF4me for storage planning, bandwidth optimization, and file transfer monitoring. Essential for enterprise document management and workflow automation293918
successBooleanPDF4me conversion status indicator - Boolean flag indicating the success or failure of the document-to-PDF conversion process. PDF4me returns true for successful conversions and false for any errors, enabling robust error handling in automated workflowstrue
inputDataTypeStringPDF4me input data type indicator - Indicates the type of input data that was processed (binary, base64, or URL). PDF4me tracks the input method for audit trails and debugging purposes in enterprise workflowsbase64
sourceFileNameStringPDF4me source document reference - The original document filename (.docx, .pptx, .xlsx, .png) that was processed by PDF4me's conversion engine. This reference is maintained for audit trails, debugging purposes, and tracking the source of generated PDF documents in enterprise workflowsdoc1.docx

N8N Action Response

The PDF4me Convert to PDF API returns a response that can be viewed in multiple formats. Choose the view that best fits your needs:

JSON Response Format

The raw JSON response from the API:

[
{
"fileName": "output.pdf",
"mimeType": "application/pdf",
"fileSize": 293918,
"success": true,
"inputDataType": "base64",
"sourceFileName": "doc1.docx"
}
]

Use Cases

Document Standardization and Archiving

  • Convert various document formats (Word, Excel, PowerPoint, images) to PDF format for document standardization, archiving, and long-term preservation
  • Process mixed document collections, legacy files, and multi-format content by converting them to PDF format for unified document management and archiving
  • Transform business documents, reports, and presentations to PDF format for consistent formatting, professional appearance, and universal accessibility

Business Process Automation and Workflow Integration

  • Convert documents from different sources and formats to PDF format for automated business processes, workflow integration, and system compatibility
  • Process incoming documents, email attachments, and file uploads by converting them to PDF format for standardized processing, review, and approval workflows
  • Transform documents from various departments and systems to PDF format for unified document management, collaboration, and business intelligence

Compliance and Regulatory Documentation

  • Convert documents to PDF format for regulatory compliance, legal documentation, and official record keeping that requires standardized, tamper-proof formats
  • Process compliance documents, audit materials, and regulatory submissions by converting them to PDF format for official filing, legal validity, and regulatory compliance
  • Transform business records, financial documents, and legal materials to PDF format for long-term storage, compliance auditing, and regulatory reporting

Get Help