Skip to main content

Create Image From PDF using n8n action

PDF4me Create Image From PDF converts PDF pages into high-quality images through n8n automation workflows. Process PDFs via n8n triggers, binary data, base64 strings, or public URLs to generate images (JPEG, PNG) from specific pages, page ranges, or all pages with customizable resolution, width settings, quality control, and flexible page selection options. When you choose Specific Pages, type what you need in Page Numbers—single pages, ranges, or keywords like all. This solution is ideal for PDF previews, thumbnail generation, web content creation, image extraction, presentation slides, and automated PDF-to-image conversion workflows that require accurate rendering with professional quality and seamless integration.

Setup

Add the PDF4me "Create Image From 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 "Create Image From PDF" action
  3. Configure input parameters (see below)
Create Image From PDF

Parameters

Complete list of parameters for the Create Image From PDF action. Configure these parameters to control PDF to image conversion.

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

ParameterTypeDescriptionExample
Input Data TypeStringYesPDF4me PDF input format selection
Choose the format of your source PDF data input.
PDF4me supports multiple input types with different field requirements
1) Binary DataYes (One Required)1) Binary Data - Use "Input Binary Field" to reference PDF file from previous node
2) Base64 StringYes (One Required)2) Base64 String - Use "Base64 PDF Content" field for encoded PDF data
3) URLYes (One Required)3) URL - Use "PDF URL" field to provide a public/open permission URL to the PDF file to convert
Input Binary FieldBinaryYes (If Binary Data)PDF4me binary PDF file input - Reference source PDF file from previous n8n node or file upload. PDF4me processes binary PDF files with automatic format detection and validation. Required when Input Data Type is "Binary Data"
Base64 PDF ContentStringYes (If Base64 String)PDF4me base64 encoded PDF input - Provide source PDF data as base64 encoded string for secure transmission. PDF4me automatically decodes and processes the PDF content. Required when Input Data Type is "Base64 String"
PDF URLStringYes (If URL)PDF4me public PDF URL input - Provide a public/open permission URL to the source PDF file to be converted to images. PDF4me downloads and processes the file from the provided URL. Required when Input Data Type is "URL"
Document NameStringYesPDF4me source document identifier - Specify a name for the source PDF document for reference and tracking purposes. This helps identify the document in logs and processing workflows
Image SettingsObjectNoPDF4me image output configuration - Configure advanced image output settings including resolution, quality, and format-specific options. Leave empty for default settings or specify custom parameters for optimized output
Image WidthNumberNoPDF4me image width in pixels - Specify the width of the generated images in pixels. If not specified, PDF4me uses the original PDF page dimensions. Higher values create larger, higher-quality images
Image FormatStringNoPDF4me output image format - Choose the output format for generated images. Options include PNG for lossless quality or JPEG for smaller file sizes
Page SelectionStringYesPDF4me page range selection - Choose which pages to convert to images. Options include all pages, specific page ranges, or individual page numbers
All PagesYes (One Required)All Pages - Convert all pages to images
Specific PagesYes (One Required)Specific Pages - Convert only specific page numbers
Page RangeYes (One Required)Page Range - Convert a range of pages
Page NumbersStringYes (If Specific Pages)Pages to convert (when Page Selection is Specific Pages)
• Type one line of text in the Page Numbers field—plain numbers, commas, hyphens, and a few keywords (see below)
First page is 1 (the opening page of the PDF is page 1)
Separate picks with commas—for example 1,3,5 is three single pages; 1,2-3,5,7- mixes singles and spans
Hyphen means “through”2-5 is pages 2, 3, 4, and 5. A dash with nothing after it (7-) means “from page 7 to the last page”
Keywords: all or a lone * for the whole file; last for the final page only; first, 0, or 1 for the first page only; -1 and -2 to count from the end
Too-large page numbers are ignored, and you can type the same page more than once if you need more than one image from it
Output File Name PrefixStringYesPDF4me output filename prefix - Specify the prefix for generated image files. PDF4me will append page numbers to create unique filenames (e.g., "page" creates "page-1.webp", "page-2.webp")
Output Binary Field NameStringYesPDF4me output variable configuration - Define the variable name for accessing the generated image binary data in your n8n workflow. This binary data can be used as input data in subsequent actions within your workflow
How to fill the page field
  • Type all to convert every page. A lone * (asterisk) does the same job if you prefer it.
  • last is only the final page.
  • first, 0, or plain 1 all mean “just the first page.” 0 is simply another way to say page 1; after that you still count 2, 3, 4…
  • -1 is the last page. -2 is the page before that (on a 12-page file that is page 11).
  • Commas let you stitch pieces together. 1,2-3,5,7- reads as: page 1, pages 2 through 3, page 5, then page 7 all the way to the end. The empty spot after 7- is what tells the service “run to the last page.”
Why we show 1,2-3,5,7- instead of 0,1-2,5,7-

0,1-2,5,7- is legal, but 0 and 1-2 both include page 1, so you can accidentally render the first page twice. 1,2-3,5,7- says the same kind of thing with less overlap.

Example strings (picture a 12-page PDF)

What you typeWhat you get
1,2-3,5,7-Page 1, pages 2–3, page 5, then pages 7–12
allPages 1 through 12
*Same as all
-1Page 12 (last)
-2Page 11 (second from the end)
lastPage 12 only
firstPage 1 only
0Page 1 only (same idea as first)

Practical notes

  • 7- with nothing after the dash means “from page 7 through the last page.”
  • Page numbers that do not exist are ignored.
  • 7-3 (backwards) still keeps page 7 from that chunk when page 7 exists; do not expect pages 6 and 5 from that piece.
  • Listing the same page more than once is allowed—each mention can produce another image.

Supported PDF Formats

FormatDescriptionFile ExtensionsMax SizePage LimitBest Use Cases
PDFPortable Document Format with vector and raster content.pdf100MB1000 pagesDocuments, reports, presentations, forms

Supported Output Image Formats

FormatDescriptionFile ExtensionsQualityBest Use Cases
PNGPortable Network Graphics with lossless compression and transparency support.pngHighScreenshots, graphics with transparency, high-quality images
JPEGJoint Photographic Experts Group with lossy compression optimized for photographs.jpg, .jpegConfigurablePhotos, web content, compressed images

Output

Output Parameters

ParameterTypeDescriptionExample
fileNameStringPDF4me generated image filename - The complete filename of the successfully created image with proper extension. PDF4me ensures unique naming and validates file format compliance for seamless integration with downstream processesdocument_1.jpeg
pageNumberNumberPDF4me source page number - The page number from the original PDF that was converted to create this image. Useful for tracking and organizing multiple images from the same document1
imageFormatStringPDF4me output image format - The format of the generated image file (e.g., "jpeg", "png"). Indicates the specific image format used for the conversion outputjpeg
fileSizeNumberPDF4me generated image file size in bytes - The exact size of the generated image file in bytes, provided by PDF4me for storage planning, bandwidth optimization, and file transfer monitoring. Essential for enterprise image management and workflow automation76832
successBooleanPDF4me conversion status indicator - Boolean flag indicating the success or failure of the PDF-to-image conversion process. PDF4me returns true for successful operations and false for any errors, enabling robust error handling in automated workflowstrue
operationStringPDF4me operation identifier - The specific operation performed by PDF4me, useful for logging and tracking different types of operations in automated workflowsCreate Images From PDF
inputTypeStringPDF4me input data type - The type of input data used for the conversion (e.g., "base64", "binary", "url"). Helps identify the source data format in workflow processingbase64

N8N Action Response

The PDF4me Create Image From 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": "document_1.jpeg",
"pageNumber": 1,
"imageFormat": "jpeg",
"fileSize": 76832,
"success": true,
"operation": "Create Images From PDF",
"inputType": "base64"
},
{
"fileName": "document_2.jpeg",
"pageNumber": 2,
"imageFormat": "jpeg",
"fileSize": 76939,
"success": true,
"operation": "Create Images From PDF",
"inputType": "base64"
}
]

Use Cases

Document Visualization and Presentation

  • Convert PDF presentations to images for web display and mobile viewing
  • Create thumbnail previews for document libraries and content management systems
  • Generate visual summaries of PDF reports and documents for quick review

Content Management and Archival

  • Extract images from PDF documents for digital asset management
  • Create searchable visual indexes of PDF content
  • Convert historical documents to images for preservation and accessibility

E-commerce and Marketing

  • Generate product images from PDF catalogs and specifications
  • Create visual content for social media and marketing campaigns
  • Convert PDF brochures to web-friendly image formats

Enterprise Document Processing

  • Automate document-to-image conversion for workflow systems
  • Create visual documentation for training materials and procedures
  • Generate images from PDF forms and reports for data visualization

Get Help