Skip to main content

Create Image from PDF - Thumbnail Generator API

PDF4me Create Image from PDF is a powerful enterprise-grade solution that converts PDF pages to high-quality images through advanced API integration. This comprehensive PDF-to-image conversion service efficiently processes PDF documents, generating images with custom dimensions, multiple format support, flexible page selection, and advanced image processing capabilities for enhanced document visualization and content management. The API processes PDF-to-image conversion by receiving PDF documents through REST API calls, utilizing advanced rendering technology and intelligent image generation algorithms for accurate document visualization and professional image processing. With comprehensive support for multiple image formats, custom dimensions, page selection, and professional image processing, this solution is ideal for thumbnail generation, document archiving, web publishing, and enterprise document workflows that require reliable PDF-to-image conversion with guaranteed quality and consistent output optimization. Create Image from PDF documents easily with API for advanced document processing and image generation.

Authenticating Your API Request

To access the PDF4me REST API, every request must include proper authentication credentials. Authentication ensures secure communication and validates your identity as an authorized user of the REST API.

Key Features

  • High-Quality Conversion: Convert PDF pages to high-quality images with precise rendering
  • Multiple Format Support: Support for JPG, PNG, BMP, GIF, TIFF, and other popular image formats
  • Custom Dimensions: Specify exact width and height for optimal image sizing
  • Flexible page selection: Send pageNrs as one line of text—pages, ranges, and keywords like all (same idea as integration Page Number fields)
  • Thumbnail Generation: Perfect for creating thumbnails and preview images
  • Professional Results: High-quality image generation with accurate PDF rendering
  • Seamless API Integration: RESTful API designed for automated document processing workflows and enterprise system integration

REST API Endpoint

The PDF4me REST API uses standard HTTP methods to interact with resources. All PDF-to-image conversion operations are performed through a single endpoint:

  • Method: POST
  • Endpoint: /api/v2/CreateImages

Supported PDF-to-Image Conversion Features

The API provides comprehensive support for various PDF-to-image conversion and processing capabilities:

Image Generation

  • High-Quality Rendering: Convert PDF pages to high-quality images with precise rendering
  • Format Support: Support for JPG, JPEG, BMP, GIF, JB2, JP2, JPF, JPX, PNG, TIF, TIFF formats
  • Custom Dimensions: Specify exact width and height for optimal image sizing
  • Professional Results: High-quality image generation with accurate PDF rendering
  • Advanced Processing: Support for complex PDF structures and conversion requirements

Page Selection

  • Text you send: Put page choices in pageNrs as one string (or map the same text to Page Number in client tools)—single pages, ranges, and keywords like all
  • Flexible combinations: Commas, spans such as 2-5, and “to the end” forms like 7- (dash, nothing after)
  • Batch processing: Convert multiple pages in one call when your string lists more than one page
  • Professional layout: High-quality page rendering with accurate content preservation

Image Processing

  • Quality Preservation: Maintain image quality during PDF-to-image conversion
  • Dimension Control: Precise width and height control for optimal image sizing
  • Professional Enhancement: High-quality image processing with accurate PDF rendering
  • Flexible Options: Customizable processing parameters for specific requirements

REST API Parameters

Complete list of parameters for the Create Image from PDF REST API. Parameters are organized by category for better understanding and implementation.

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

Required Parameters

ParameterTypeDescriptionExample
File Content*Base64The complete content of the source PDF document encoded in Base64 format for image generation processing. This parameter contains the entire PDF document data required for image conversion, rendering, and processing workflows. Essential for secure document handling and API-based PDF-to-image conversion operations.JVBERi...
File Name*StringThe source PDF document filename with proper .pdf extension for image generation operations. This parameter identifies the input document for image conversion, rendering, and processing workflows. Required for document identification and processing pipeline management in PDF-to-image conversion operations.document.pdf
Image Extension*EnumSelect the desired image output format from the supported formats list. Choose from JPG, JPEG, BMP, GIF, JB2, JP2, JPF, JPX, PNG, TIF, TIFF for optimal image generation and format compatibility. This parameter determines the output image format and ensures proper image processing for different use cases.jpeg
Width Pixels*NumericOutput width in pixels; height follows the page aspect ratio. Typical values: thumbnails 150400, web 8001200.800

Page selection (pageNrs / Page Number)

Send one string in pageNrs (or whatever your integration labels Page Number), unless you pass page lists only inside imageAction.PageSelection.

ParameterTypeDescriptionExample
pageNrs / Page NumberStringPages to convert
One line of text—plain numbers, commas, hyphens, and a few keywords (see below)
First page is 1
Separate picks with commas—for example 1,3,5 or 1,2-3,5,7-
Hyphen “through”2-5 is pages 2–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; repeat a page in the string if you need more than one image from it
1,3,5 or all or 1,2-3,5,7-

:::tip How to fill pageNrs

  • 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.”

:::

:::info 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.

Output

The PDF4me Create Image from PDF REST 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:

{
"File Content": "Output file content from the PDF4me Create Thumbnail action",
"File Name": "Output file name from the PDF4me Create Thumbnail action"
}

Request Example

Content-Type: application/json
Authorization: YOUR_API_KEY

Note: Get your API key from the PDF4me Dashboard

Payload

{
"docContent": "please put image base64 content",
"docname": "output",
"imageAction": {
"WidthPixel": "50",
"ImageExtension": "jpeg",
"PageSelection": {
"PageNrs": [
1,
1
]
}
},
"pageNrs": "1"
}

Code Samples

The PDF4me Create Image from PDF REST API provides code samples in multiple programming languages. Choose the language that best fits your development environment:

C# (CSharp) Sample

Complete C# implementation for PDF-to-image conversion:

PDF-to-Image Conversion Features

Image Generation

  • High-Quality Rendering: Convert PDF pages to high-quality images with precise rendering
  • Format Support: Support for JPG, JPEG, BMP, GIF, JB2, JP2, JPF, JPX, PNG, TIF, TIFF formats
  • Custom Dimensions: Specify exact width and height for optimal image sizing
  • Professional Results: High-quality image generation with accurate PDF rendering
  • Advanced Processing: Support for complex PDF structures and conversion requirements

Page Selection

  • Text you send: Put page choices in pageNrs as one string (or map the same text to Page Number in client tools)—single pages, ranges, and keywords like all
  • Flexible combinations: Commas, spans such as 2-5, and “to the end” forms like 7- (dash, nothing after)
  • Batch processing: Convert multiple pages in one call when your string lists more than one page
  • Professional layout: High-quality page rendering with accurate content preservation

Image Processing

  • Quality Preservation: Maintain image quality during PDF-to-image conversion
  • Dimension Control: Precise width and height control for optimal image sizing
  • Professional Enhancement: High-quality image processing with accurate PDF rendering
  • Flexible Options: Customizable processing parameters for specific requirements

Industry Use Cases & Applications

Use Cases

  • Thumbnail Generation: Create thumbnails and preview images from PDF documents
  • Document Archiving: Convert PDF pages to images for archival and storage
  • Web Publishing: Generate images from PDFs for web content and presentations
  • Content Management: Convert PDF documents to images for CMS integration
  • E-commerce: Create product images from PDF catalogs and specifications
  • Social Media: Generate images from PDFs for social media sharing
  • Documentation: Convert PDF pages to images for technical documentation
  • Business Process Automation: Automate PDF-to-image conversion workflows for enterprise operations

Get Help