Convert URL to PDF using n8n action
PDF4me Convert URL to PDF transforms web pages into high-quality PDF documents through n8n automation workflows. Process web URLs via n8n triggers to capture complete web pages including HTML, CSS, JavaScript, images, fonts, and interactive elements with accurate rendering, responsive layout handling, full-page capture, and professional formatting. This solution is ideal for web page archiving, documentation generation, content preservation, compliance reporting, web scraping, automated snapshots, and digital record-keeping workflows that require reliable URL-to-PDF conversion with accurate web rendering and seamless integration.
Setup
Add the PDF4me "Convert URL 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:
- Add PDF4me node to workflow
- Select "Convert URL to PDF" action
- Configure input parameters (see below)

Parameters
Complete list of parameters for the Convert URL to PDF action. Configure these parameters to control URL to PDF conversion.
Important: Parameters marked with an asterisk (***) are required and must be provided for the action to function correctly.
| Parameter | Type | Description | Example |
|---|---|---|---|
| Web URL*** | String | Target Webpage URL • The complete web address of the page to be converted to PDF • PDF4me's advanced rendering engine processes the webpage • Must be a valid, accessible URL | https://example.com/page |
| File Name*** | String | PDF Output Filename • Specify the name for the generated PDF file • Must include .pdf extension • PDF4me ensures unique naming and format validation | URL_TO_PDF.pdf |
| Authentication Type*** | String | Website Authentication Method • Specify the authentication type for protected websites • Options: No Authentication, Basic Authentication, OAuth, API keys • PDF4me supports various authentication methods | No Authentication |
| Page Layout*** | String | Page Orientation Setting • Choose between Portrait (vertical) or Landscape (horizontal) • Affects PDF page dimensions and content flow • Default is Portrait | Portrait |
| Page Format*** | String | Page Size Format • Select the paper size format for PDF generation • Supports standard formats: A-series, Legal, Tabloid • Default is A4 | A4 |
| Binary Data Output Name*** | String | Binary 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:
| Parameter | Type | Description | Example |
|---|---|---|---|
| Scale | Decimal | Content Scaling Factor • Control the size of content in the PDF • 1.0 represents 100% original size • Maintains quality while adjusting dimensions | 0.8 |
| Top Margin | String | Top Margin Configuration • Set the top margin space (pixels, inches, or centimeters) • Ensures consistent spacing from top edge • Default is 40px | 40px |
| Left Margin | String | Left Margin Configuration • Define the left margin space for content positioning • Maintains consistent left alignment • Default is 40px | 40px |
| Right Margin | String | Right Margin Configuration • Set the right margin to control content width • Prevents text cutoff • Default is 40px | 40px |
| Bottom Margin | String | Bottom Margin Configuration • Configure bottom spacing for proper page layout • Prevents content from being cut off • Default is 40px | 40px |
| Print Background | Boolean | Background Printing Control • Enable or disable background elements (colors, patterns, images) • Ensures accurate visual representation • Default is true | true |
| Display Header Footer | Boolean | Header/Footer Visibility • Control inclusion of page headers and footers • Includes page numbers, titles, timestamps • Default is true | true |
| Custom Profiles | String | Custom 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
| Parameter | Type | Description | Example |
|---|---|---|---|
| fileName | String | PDF4me 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 processes | URL_TO_PDF.pdf |
| mimeType | String | PDF4me 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 applications | application/pdf |
| fileSize | Number | PDF4me 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 automation | 1347439 |
| success | Boolean | PDF4me conversion status indicator - Boolean flag indicating the success or failure of the URL-to-PDF conversion process. PDF4me returns true for successful conversions and false for any errors, enabling robust error handling in automated workflows | true |
| sourceUrl | String | PDF4me source URL reference - The original webpage URL 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 workflows | https://en.wikipedia.org/wiki/Main_Page |
| layout | String | PDF4me page orientation setting - The page orientation used during PDF generation by PDF4me's rendering engine. Indicates whether the PDF was created in Portrait (vertical) or Landscape (horizontal) orientation as specified in the input parameters | portrait |
| format | String | PDF4me page size format - The paper size format used for PDF generation by PDF4me's document processing engine. Reflects the page dimensions (A4, A3, Letter, etc.) that were applied during the conversion process for consistent document formatting | A4 |
###N8N Action Response
The PDF4me Convert URL to PDF API returns a response that can be viewed in multiple formats. Choose the view that best fits your needs:
- JSON
- Table
- Schema
- Binary
JSON Response Format
The raw JSON response from the API:
[
{
"fileName": "URL_TO_PDF.pdf",
"mimeType": "application/pdf",
"fileSize": 1347439,
"success": true,
"sourceUrl": "https://en.wikipedia.org/wiki/Main_Page",
"layout": "portrait",
"format": "A4"
}
]
Table View
Response data in a structured table format:
| Parameter | Value |
|---|---|
| fileName | URL_TO_PDF.pdf |
| mimeType | application/pdf |
| fileSize | 1347439 |
| success | true |
| sourceUrl | https://en.wikipedia.org/wiki/Main_Page |
| layout | portrait |
| format | A4 |
Schema View
The data structure and types of the response:
1 item
fileName: AB URL_TO_PDF.pdf
mimeType: AB application/pdf
fileSize: # 1347439
success: ☑ true
sourceUrl: AB https://en.wikipedia.org/wiki/Main_Page
layout: AB portrait
format: AB A4
Type Indicators:
AB= String#= Number☑= Boolean
Binary Data View
The actual PDF file data and metadata:
data
─────────────────────────────
File Name: URL_TO_PDF.pdf
File Extension: pdf
Mime Type: application/pdf
File Size: 1.35 MB
Binary Data Access:
- n8n Binary Object:
$binary.data.data - Base64 Content: Available for direct use
- File Operations: Ready for download, email, or storage
Use Cases
Web Content Archiving and Legal Documentation
- Convert web pages, online articles, and digital content to PDF format for legal evidence, compliance documentation, and regulatory record keeping
- Process dynamic web content, social media posts, and online communications by converting them to PDF format for legal discovery, litigation support, and evidence preservation
- Archive website snapshots, online documentation, and digital assets to PDF format for historical preservation, compliance auditing, and regulatory reporting
Business Intelligence and Competitive Analysis
- Convert competitor websites, market research pages, and industry reports to PDF format for competitive analysis, market intelligence, and strategic planning
- Process online dashboards, analytics reports, and business metrics by converting them to PDF format for executive reporting, board presentations, and stakeholder communications
- Transform web-based surveys, customer feedback, and online reviews to PDF format for analysis, reporting, and business decision-making
Content Management and Digital Publishing
- Convert web-based content, online articles, and digital publications to PDF format for print distribution, offline access, and content archiving
- Process online forms, web applications, and digital workflows by converting them to PDF format for record keeping, compliance documentation, and process documentation
- Transform web-based catalogs, product pages, and marketing content to PDF format for offline distribution, print marketing, and customer communications