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
pageNrsas one line of text—pages, ranges, and keywords likeall(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
pageNrsas one string (or map the same text to Page Number in client tools)—single pages, ranges, and keywords likeall - Flexible combinations: Commas, spans such as
2-5, and “to the end” forms like7-(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
| Parameter | Type | Description | Example |
|---|---|---|---|
| File Content* | Base64 | The 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* | String | The 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* | Enum | Select 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* | Numeric | Output width in pixels; height follows the page aspect ratio. Typical values: thumbnails 150–400, web 800–1200. | 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.
| Parameter | Type | Description | Example |
|---|---|---|---|
| pageNrs / Page Number | String | Pages 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
allto convert every page. A lone*(asterisk) does the same job if you prefer it. lastis only the final page.first,0, or plain1all mean “just the first page.”0is simply another way to say page 1; after that you still count 2, 3, 4…-1is the last page.-2is 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 after7-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 type | What you get |
|---|---|
1,2-3,5,7- | Page 1, pages 2–3, page 5, then pages 7–12 |
all | Pages 1 through 12 |
* | Same as all |
-1 | Page 12 (last) |
-2 | Page 11 (second from the end) |
last | Page 12 only |
first | Page 1 only |
0 | Page 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
- Table
- Schema
- Binary
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"
}
Table View
Response data in a structured table format:
| Parameter | Value |
|---|---|
| File Content | Output file content from the PDF4me Create Thumbnail action |
| File Name | Output file name from the PDF4me Create Thumbnail action |
Schema View
The data structure and types of the response:
2 items
File Content: Binary Output file content from the PDF4me Create Thumbnail action
File Name: String Output file name from the PDF4me Create Thumbnail action
Type Indicators:
Binary= Binary dataString= Text data
Binary Data View
The actual generated image file data:
data
─────────────────────────────
File Content: Output file content from the PDF4me Create Thumbnail action
File Name: Output file name from the PDF4me Create Thumbnail action
Binary Data Access:
- Image Content: Ready for download or further processing
- Generated Image: Complete image converted from PDF page
Request Example
Header
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#
- Java
- JavaScript
- Python
- Salesforce
- n8n
- Google Script
- AWS Lambda
Google Script Sample
Google Apps Script implementation for Google Workspace integration:
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
pageNrsas one string (or map the same text to Page Number in client tools)—single pages, ranges, and keywords likeall - Flexible combinations: Commas, spans such as
2-5, and “to the end” forms like7-(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
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