Convert Image to PDF and PDF to Image avatar

Convert Image to PDF and PDF to Image

Pricing

from $0.00005 / actor start

Go to Apify Store
Convert Image to PDF and PDF to Image

Convert Image to PDF and PDF to Image

Convert images (JPG, PNG, BMP, and more) into high-quality PDFs, or extract images from PDF files in seconds. Image–PDF Converter Pro delivers fast, reliable, and professional results for all your document and image conversion needs.

Pricing

from $0.00005 / actor start

Rating

0.0

(0)

Developer

Akash Kumar Naik

Akash Kumar Naik

Maintained by Community

Actor stats

1

Bookmarked

26

Total users

2

Monthly active users

15 days ago

Last modified

Share

Image and PDF Converter

Transform images to PDFs and PDFs to images with professional quality. This Apify Actor provides bidirectional conversion between images (JPEG, PNG, BMP) and PDF documents, featuring high-resolution output, optional watermarking, and flexible page-merging. Perfect for document archiving, content creation, OCR pipelines, and cross-platform workflows.

Table of Contents


Key Features

  • Bidirectional Conversion — Convert images → PDF and PDF → images in a single Actor
  • Auto-Detection — Automatically detects file type and picks the right conversion direction
  • High-Resolution Output — Configurable scale factor (default 3×) for crisp, OCR-ready images
  • Quality Control — Adjust compression quality (1–100) to balance file size vs. fidelity
  • Custom Watermarking — Add text watermarks with configurable opacity, font size, color, and position
  • Merge Mode — Combine all PDF pages into one composite image for previews or social sharing
  • Cloud Storage Support — Process files directly from Google Drive, Dropbox, or any public URL
  • Pay-Per-Event Pricing — Only pay for what you convert; no flat subscription fees

How It Works

  1. Provide a direct URL to your image or PDF file
  2. Choose a conversion direction (auto, imageToPdf, or pdfToImages)
  3. Optionally configure quality, watermark, and merge settings
  4. The Actor downloads the file, converts it, stores the result in the Apify Key-Value Store, and pushes a dataset record with the output URL

Input Parameters

FieldTypeRequiredDefaultDescription
urlStringDirect URL to the image or PDF file (supports Google Drive, Dropbox, and public URLs)
conversionDirectionString"auto"auto detects file type automatically; or force imageToPdf / pdfToImages
qualityInteger100Output quality 1–100 (higher = better quality, larger file)
mergeOutputBooleanfalseWhen converting PDF → images, merge all pages into a single image file

Example Input

{
"url": "https://www.africau.edu/images/default/sample.pdf",
"conversionDirection": "auto",
"quality": 90,
"mergeOutput": false
}

Watermarked Image-to-PDF Example

{
"url": "https://example.com/photo.jpg",
"conversionDirection": "imageToPdf",
"quality": 95,
"watermark": {
"text": "© 2025 My Company",
"opacity": 0.4,
"fontSize": 28,
"color": "gray",
"position": "bottom-right"
}
}

Output Format

Results are stored in the Apify Dataset and the converted files are saved in the Key-Value Store.

Successful Record (Image → PDF)

{
"inputUrl": "https://example.com/photo.jpg",
"fileName": "photo.jpg",
"conversionType": "imageToPdf",
"outputUrl": "https://api.apify.com/v2/key-value-stores/<storeId>/records/result_1234567890.pdf",
"outputKey": "result_1234567890.pdf"
}

Successful Record (PDF → Images, one record per page)

{
"inputUrl": "https://example.com/document.pdf",
"fileName": "document.pdf",
"conversionType": "pdfToImages",
"outputUrl": "https://api.apify.com/v2/key-value-stores/<storeId>/records/result_page_1_1234567890.png",
"outputKey": "result_page_1_1234567890.png",
"page": 1
}

Error Record

{
"inputUrl": "https://example.com/broken.pdf",
"status": "error",
"errorCode": "CONVERSION_ERROR",
"message": "Failed to process file: HTTP error! status: 403"
}

Quick Start

  1. Open the Image and PDF Converter Actor on Apify Console
  2. Click "Try for free"
  3. Paste your file URL into the url field
  4. Set conversionDirection to auto (or choose explicitly)
  5. Click "Start" and monitor the run
  6. Download your converted file from the Output tab or via the dataset record URL

Pricing

This Actor uses Pay-Per-Event (PPE) pricing — you are only charged for what you actually use:

EventEvent NamePrice
Actor start (synthetic, auto-charged by Apify)apify-actor-start$0.00005 per start
File converted (image → PDF or PDF → images)converted-file$0.005 per file
PDF page extracted (PDF → images, per page)extracted-page$0.005 per page

The apify-actor-start event is automatically charged by Apify and covers the first 5 seconds of compute cost. You do not need to charge it manually in your code.

Cost Examples

TaskCost BreakdownTotal
Convert 1 image to PDF$0.00005 (start) + $0.005 (file)~$0.005
Convert a 10-page PDF to images$0.00005 (start) + $0.005 (file) + 10 × $0.005 (pages)~$0.055
Convert 100 images to PDFs$0.00005 (start) + 100 × $0.005 (files)~$0.50

Spending Limits

Users can set a maximum spend per run in the Apify Console. The Actor respects this limit — if the budget is reached mid-run, it stops gracefully and outputs whatever has been converted so far.

Free tier: New Apify accounts include free platform credits. Check Apify Pricing for current free tier limits.


Examples

Convert PDF to High-Resolution Images (for OCR)

{
"url": "https://example.com/document.pdf",
"conversionDirection": "pdfToImages",
"quality": 100
}

Produces one dataset record per page with a direct image URL — ideal for feeding into OCR or AI vision models.

Merge All PDF Pages into One Image

{
"url": "https://example.com/multi-page.pdf",
"conversionDirection": "pdfToImages",
"mergeOutput": true,
"quality": 90
}

All pages are stacked vertically into a single PNG — great for document previews or social media thumbnails.

Convert Image to Watermarked PDF

{
"url": "https://example.com/photo.png",
"conversionDirection": "imageToPdf",
"quality": 95,
"watermark": {
"text": "CONFIDENTIAL",
"opacity": 0.6,
"fontSize": 30,
"color": "red",
"position": "center"
}
}

Troubleshooting

"File is corrupted or empty"

  • Ensure the URL is publicly accessible (no login required)
  • Check that the file is not password-protected or empty

"Unsupported file format"

  • Supported image formats: JPEG, PNG, BMP
  • Supported document format: PDF
  • Verify the file extension matches the actual content type

"HTTP error! status: 403 / 404"

  • The URL may require authentication or the file has been moved/deleted
  • For Google Drive: make sure sharing is set to "Anyone with the link"

Low image quality for OCR

  • The default scale factor (3×) already produces ~216 DPI equivalent output
  • For very fine text, try passing "scale": 4.0 via the pdfOptions field

Performance Tips

  • Use mergeOutput: false (default) for large PDFs to avoid memory spikes
  • Higher quality settings increase processing time and output file size
  • Watermarking adds minimal overhead

Support

  • Issues & Feature Requests: Use the Issues tab on the Actor page
  • Community: Join the Apify Discord to connect with other developers
  • Documentation: Apify Docs for platform guidance