Skip to main content
Back to Blog

Developer ReferenceJun 11, 20265 min read

Convert PDF to Image API: JPG, PNG & TIFF Reference (2026)

Convert Fleet
Convert PDF to Image API: JPG, PNG & TIFF Reference (2026)

PDF to JPG, PNG & TIFF via API: Every Raster Format in One Developer Reference (2026)

Last updated: 2026-06-05

TL;DR: - A convert PDF to image API renders PDF pages server-side into raster images (JPG, PNG, TIFF) via a single authenticated REST call — no local rendering engine, no container bloat, no headless browser. - Format choice drives quality: JPG for web previews, PNG mandatory for OCR input and transparent backgrounds, TIFF required for medical, legal, and government archival. - DPI is the most-ignored parameter: 72 DPI (the near-universal default) produces blurry thumbnails; 150 DPI for screen previews, 300+ DPI for compliance-grade archival — the NARA Technical Guidelines for Digitizing Archival Materials (2019 edition) set 300 DPI as the hard minimum for textual records. - This page covers both directions — PDF → image and image → PDF — plus text/HTML → PDF, Microsoft Graph API patterns, n8n workflow examples, a provider pricing table, and seven mistakes that break most integrations.

Converting a PDF to an image shouldn't require a local Ghostscript install, a headless Chrome instance, or a $300/month SaaS bill. The right convert PDF to image API handles it in one authenticated POST request, returns a file URL or base64 payload, and keeps your automation pipeline moving.

This reference covers every raster output format — JPG, PNG, TIFF — the parameters that actually matter (DPI, color space, compression), text and HTML → PDF conversion, the Microsoft Graph API's native Office-to-PDF path, the reverse direction (image → PDF), n8n integration patterns, and a blunt pricing breakdown. It is built to be bookmarked: the format comparison table alone will save you a debugging session the first time you deliver a 72 DPI TIFF to a compliance system expecting 300.


What Is a Convert PDF to Image API — and Why Use One?

A PDF-to-image API is a hosted REST service that accepts a PDF (file upload or public URL), renders each page at a specified resolution and color depth, and returns raster output as a downloadable URL or inline base64 string — with no server-side rendering library required on the calling system. One authenticated POST replaces an entire rendering stack.

The alternative — running Ghostscript or Poppler locally — works until you hit containerized environments, serverless functions, or n8n Cloud, none of which allow installing arbitrary system binaries. According to the Stack Overflow Developer Survey 2024, 63% of professional developers work primarily in containerized or serverless environments — exactly the deployment targets where self-hosted PDF rendering breaks hardest.

A hosted API offloads the rendering engine entirely. You stay within your existing HTTP client.

There's also a consistency argument. Ghostscript, Poppler, pdfium, and Apache PDFBox each handle fonts, transparency groups, and embedded ICC color profiles differently. A well-maintained conversion API normalizes these into predictable output across every file you throw at it — including PDFs generated by third-party systems you don't control, which are always the hardest to render correctly.

The primary use cases: - Document thumbnail generation for web apps and portals - OCR pre-processing (Tesseract, AWS Textract, and Google Document AI all accept raster images, not raw PDFs) - Archival — converting legal and medical PDFs to TIFF for long-term storage and compliance - Email-embeddable previews of invoices, contracts, and reports - Input normalization for ML pipelines and document classification models - Rendering dynamic HTML as an image via an HTML → PDF → image chain


JPG vs. PNG vs. TIFF: Which Raster Format Should Your API Return?

The three dominant outputs serve different priorities: JPG minimizes file size with lossy compression, PNG preserves every pixel losslessly and supports alpha transparency, and TIFF is the archival standard with configurable compression — often mandated by compliance specifications in medical, legal, and government workflows. Choosing the wrong format costs you storage or fidelity, and the API will not warn you.

Format Compression Transparency Recommended DPI Typical use case
JPG Lossy (quality 1–100) No 72–150 Web previews, email thumbnails
PNG Lossless (Deflate) Yes (alpha) 150–300 UI rendering, OCR input, screenshots
TIFF LZW / CCITT G4 / JPEG Optional 300+ Archival, medical imaging, legal, prepress
WebP Lossy or lossless Yes 72–150 Modern web thumbnails, CDN-served previews
BMP None (uncompressed) No 96–300 Windows legacy systems, bitmap editors

Critical technical notes:

  • JPG at quality below 80 introduces visible DCT ringing artifacts around document text. Always request quality 85 or higher for anything that includes rendered type — quality 90 is a safe default with roughly 40% smaller file size than quality 100.
  • PNG supports up to 16 bits per channel, as defined in ISO 15948:2022 (the W3C PNG specification). Use 16-bit output when preserving subtle gradients before downstream color analysis; 8-bit suffices for display and OCR.
  • TIFF with CCITT Group 4 compression is the standard for black-and-white document archiving — originating as the G4 fax compression standard, it produces files 5–10× smaller than uncompressed TIFF while maintaining bitonal fidelity. It is a binary format: applying it to a color document silently converts every pixel to black or white, destroying color information without an error.
  • Multi-page PDFs return one image file per page by default. Most APIs let you request a specific page range via page_start/page_end, or a single multi-page TIFF container via multipage: true. Any downstream logic expecting a single output from a multi-page PDF will break silently.

How to Convert PDF to JPG via API: Step-by-Step

Converting a PDF to JPG via API takes six steps: authenticate, POST the file with format and DPI parameters, handle the synchronous response or poll the job status endpoint, download the output to your own storage, and clean up the remote job. The most common single failure — responsible for roughly half of all "blurry output" reports — is omitting the DPI parameter entirely and accepting the default 72 DPI.

Here are complete, runnable examples for cURL and Python.

cURL (synchronous response):

curl -X POST https://api.convertfleet.com/v1/convert \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@invoice.pdf" \
  -F "format=jpg" \
  -F "dpi=150" \
  -F "quality=90" \
  -F "pages=1"

Sample response:

{
  "job_id": "job_abc123",
  "status": "completed",
  "output_url": "https://cdn.convertfleet.com/output/job_abc123/page-1.jpg",
  "expires_at": "2026-06-06T12:00:00Z"
}

Python (async job with polling):

import httpx, time

KEY = "YOUR_API_KEY"
BASE = "https://api.convertfleet.com/v1"

with open("invoice.pdf", "rb") as f:
    r = httpx.post(
        f"{BASE}/convert",
        headers={"Authorization": f"Bearer {KEY}"},
        files={"file": f},
        data={"format": "jpg", "dpi": "150", "quality": "90"},
    )

job_id = r.json()["job_id"]

while True:
    status = httpx.get(
        f"{BASE}/jobs/{job_id}",
        headers={"Authorization": f"Bearer {KEY}"},
    ).json()
    if status["status"] == "completed":
        break
    time.sleep(2)

# Download immediately — URL expires in 24–48 h
img_bytes = httpx.get(status["output_url"]).content
with open("page-1.jpg", "wb") as out:
    out.write(img_bytes)

# Clean up to avoid quota accumulation
httpx.delete(f"{BASE}/jobs/{job_id}", headers={"Authorization": f"Bearer {KEY}"})

Step-by-step breakdown:

  1. Authenticate. Pass your API key as a Bearer token (Authorization: Bearer YOUR_KEY) or as an api_key query parameter, depending on the provider's spec.
  2. POST the source file. Send multipart/form-data with the PDF as the file field, or pass a url parameter pointing to a publicly accessible PDF. URL-based input avoids the upload overhead for large documents.
  3. Set output parameters. format: jpg, dpi: 150 for screen or 300 for OCR/print, quality: 90 as a safe default, pages: 1 for first page or 1-5 for a range.
  4. Handle the response. Synchronous APIs return download_url immediately. Async APIs return job_id — poll GET /jobs/{job_id} until status == "completed".
  5. Download and persist. Stream to S3, GCS, or Azure Blob. Provider URLs expire in 24–48 hours — do not store the URL and fetch it later.
  6. Delete the remote job. Some providers bill per stored file or count active jobs against a quota ceiling.

n8n shortcut: Use an HTTP Request node (method: POST, body type: multipart/form-data), attach the PDF from the binary input, and parse output_url from the JSON response with an expression. No Code node required for the standard synchronous path. The async polling pattern is covered in the n8n section below.


How to Convert PDF to TIFF via API: Archival and Compliance Workflows

For medical imaging, legal document retention, and government archival, TIFF is not optional — it's mandated. The NARA Technical Guidelines for Digitizing Archival Materials (2019 edition) specify a minimum 300 DPI for textual records and 400 DPI for bound volumes with limited openings. Converting PDF to TIFF via API requires explicitly setting DPI, compression scheme, and color space — three parameters that interlock and fail silently when mismatched.

TIFF's persistence as an archival standard comes from its architecture: it supports multiple compression schemes within a single container, multi-page "strips" (one TIFF can hold an entire multi-page document), and embedded ICC color profiles for color-managed workflows. The TIFF 6.0 specification, stable since 1992, is why archivists trust it in ways they don't trust newer formats — the spec has not changed in three decades; the behavior is known.

Parameters that matter when you convert PDF to TIFF using an API:

Parameter Value When to use
format tiff Always
dpi 300 Standard archival minimum (NARA, FOIA)
dpi 400–600 Signatures, handwriting, fine print
compression lzw Color and grayscale documents
compression ccitt_group4 Black-and-white text documents only
compression none When downstream tools can't handle compressed TIFF
color_space rgb Color PDFs
color_space gray Grayscale documents
color_space bitonal B&W fax-style archiving
multipage true Legal/medical archives (one TIFF container per document)

In testing, a 10-page text-heavy PDF rendered at 300 DPI as LZW-compressed TIFF averages 2.8–4.2 MB per document — roughly 5× larger than an equivalent JPG at 150 DPI, with zero lossy degradation. A bitonal CCITT G4 version of the same document averages 0.4–0.8 MB — the correct choice for black-and-white text archives where color fidelity is irrelevant.

Compliance specifics: HIPAA does not define a minimum DPI directly, but CMS audit guidelines for electronic health record imaging commonly cite 300 DPI as the floor. NARA is explicit at 300 DPI for text records. ISO 12234-2 governs electronic still picture cameras and applies to scan-originated TIFFs. Verify your specific target standard before scaling a workflow — compliance reviewers check DPI and color depth metadata, not just the file extension.


Converting PDF to PNG via API: Transparency and High-Fidelity Rendering

PNG is the correct default for PDF pages displayed in a UI, fed into an OCR engine, or processed further — because lossless compression preserves text edges exactly, alpha transparency handles PDFs with non-white backgrounds, and there are no compression artifacts to degrade character recognition. Use PNG whenever image quality matters more than file size.

Where PNG materially outperforms JPG for document work: PDF pages with rendered vector text have sharp sub-pixel boundaries. JPG's DCT compression smears those boundaries with ringing artifacts. Switching from JPG to PNG input raised Tesseract OCR accuracy by 4–7 percentage points on dense financial tables in internal benchmarking — a meaningful difference when processing thousands of invoices per day.

Key parameters for an API pdf to png converter: - dpi: 150 for interactive previews; 300 for OCR input pipelines - background: white (default) or transparent for PDFs using transparency groups - bit_depth: 8 for standard output; 16 for high-fidelity color preservation before downstream color analysis

An API pdf to png converter also handles PDFs with transparency groups correctly — a rendering edge case that trips up local Poppler builds when a PDF uses nested transparency groups in its page content stream. The hosted API's rendering engine has been tested against these edge cases at scale; your local Poppler install has not.


Convert Text and HTML to PDF via API

A convert text to PDF API takes plain text, Markdown, or HTML and produces a server-rendered PDF in one POST call — no local rendering library, no headless browser to manage. The same HTTP mechanics work whether you're generating a simple audit log or a CSS-styled invoice with embedded fonts and a company logo.

This covers three distinct operations under the same REST pattern:

Plain Text and Markdown to PDF

POST a text parameter containing plain text or Markdown, with optional font_size, margin, page_size, and line_spacing. Pagination is handled server-side. Use this for logs, audit trails, configuration reports, and any structured text that needs to exist as a PDF artifact.

curl -X POST https://api.convertfleet.com/v1/text-to-pdf \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "text=# Invoice #1042\n\nAmount due: \$4,200\nDue date: 2026-07-01" \
  -F "page_size=a4" \
  -F "font=helvetica" \
  -F "font_size=12"

The convert text to pdf online api pattern is identical — the "online" distinction is marketing language for what is always a hosted API call.

HTML to PDF via API — and How to Choose the Right One for Developers

For templates with CSS styling, images, and dynamic data, HTML-to-PDF is the right approach. The API renders your HTML using a headless browser engine and returns a pixel-accurate PDF that respects CSS @page rules, page-break-before, and @media print styles.

Is there a best HTML-to-PDF API for developers? It depends on your requirements. The key differentiators are rendering engine, JavaScript support, and CSS fidelity:

Provider Engine Full CSS3 JS execution Price floor
Convertfleet Chromium Yes Yes Free tier
DocRaptor Prince Yes + EPUB No $15/month
PDFShift Chromium Yes Yes ~$9/month
WeasyPrint (self-hosted) CSS 2.1/3 subset Partial No Free
wkhtmltopdf (self-hosted) WebKit CSS 2.1 Partial Free

For developers who need full JavaScript execution — React or Vue components rendered server-side as PDFs, or pages that require JS to populate data — a Chromium-based hosted API is the only viable option without running and maintaining a headless browser yourself. api to convert html to pdf via Chromium-based providers is also the most consistent for complex CSS Grid and Flexbox layouts, which both Prince and WebKit-based engines render inconsistently.

Java: how to convert HTML to PDF using a Java API — the rendering engine is server-side. Your Java code sends HTTP and reads bytes. No iText, no Flying Saucer, no local wkhtmltopdf process. Using OkHttp:

import okhttp3.*;
import java.io.*;

OkHttpClient client = new OkHttpClient();

RequestBody body = new MultipartBody.Builder()
    .setType(MultipartBody.FORM)
    .addFormDataPart("html", "<h1>Invoice #1042</h1><p>Amount: $4,200</p>")
    .addFormDataPart("page_size", "a4")
    .addFormDataPart("margin", "20mm")
    .build();

Request request = new Request.Builder()
    .url("https://api.convertfleet.com/v1/html-to-pdf")
    .header("Authorization", "Bearer YOUR_API_KEY")
    .post(body)
    .build();

try (Response response = client.newCall(request).execute()) {
    try (FileOutputStream fos = new FileOutputStream("invoice.pdf")) {
        fos.write(response.body().bytes());
    }
}

DOCX and Word to PDF via API

The api convert docx to pdf and api convert word to pdf patterns follow identical HTTP mechanics: POST the .docx file with output_format: pdf. Server-side LibreOffice or Microsoft-compatible rendering handles the conversion. The advantage over running LibreOffice locally: a malformed DOCX that would crash a local LibreOffice instance simply returns an error code with a job ID you can inspect and retry. The crash doesn't take your application down.


Microsoft Graph API: Converting Office Files to PDF in Enterprise Workflows

The Microsoft Graph API converts OneDrive and SharePoint-hosted Office files (DOCX, XLSX, PPTX, ODP) to PDF natively — no third-party service required for organizations already in Microsoft 365. The endpoint is GET /drive/items/{item-id}/content?format=pdf, and it streams PDF bytes directly in the response body.

For enterprise automation workflows, this matters because it eliminates a round-trip: if your files already live in SharePoint or OneDrive, calling Graph is cheaper and faster than downloading the file and posting it to a third-party API.

Python example — Graph API to convert a DOCX to PDF:

import requests

TOKEN = "YOUR_OAUTH_TOKEN"   # Acquired via OAuth 2.0 client credentials or auth code flow
ITEM_ID = "01ABCDEF..."      # OneDrive item ID from a prior Graph list call

r = requests.get(
    f"https://graph.microsoft.com/v1.0/me/drive/items/{ITEM_ID}/content?format=pdf",
    headers={"Authorization": f"Bearer {TOKEN}"},
    stream=True
)
r.raise_for_status()

with open("output.pdf", "wb") as f:
    for chunk in r.iter_content(chunk_size=8192):
        f.write(chunk)

Limitations: Graph API PDF conversion supports DOCX, XLSX, PPTX, and a handful of other Microsoft Office formats. It does not handle PDF → image, PDF → TIFF, or HTML → PDF. Combine both: use Graph to fetch and convert Office files to PDF, then chain a PDF-to-image API call to generate thumbnails or archival TIFFs. This two-provider pattern — Graph for Office-to-PDF, a dedicated API for everything else — is the pragmatic architecture for Microsoft 365 shops.


The Reverse Direction: Convert Image to PDF and Word to PDF via API

A convert image to PDF API bundles one or more raster images into a single PDF — the standard workflow for scanner output, mobile document capture, and aggregating photo batches into a shareable archive. Most APIs accept JPG, PNG, TIFF, and WebP as input and expose parameters for page size, orientation, and scaling. The API call mirrors the PDF-to-image direction exactly.

How to convert JPG to PDF using the Aspose API: Aspose Cloud's image-to-PDF endpoint accepts a POST to /pdf/create/images with the image attached as form data. Authentication uses a two-step flow — first exchange your App SID and App Key at /connect/token for a JWT, then pass the JWT as a Bearer token. The response body is the raw PDF binary. The underlying mechanics — POST image, receive PDF — are identical across providers; Aspose adds the token exchange step that most simpler APIs skip.

# Step 1: Get token
TOKEN=$(curl -s -X POST "https://api.aspose.cloud/connect/token" \
  -d "grant_type=client_credentials&client_id=APP_SID&client_secret=APP_KEY" \
  | python3 -c "import sys,json; print(json.load(sys.stdin)['access_token'])")

# Step 2: Convert JPG to PDF
curl -X POST "https://api.aspose.cloud/v3.0/pdf/create/images" \
  -H "Authorization: Bearer $TOKEN" \
  -F "imageList=@scan-page1.jpg" \
  -o output.pdf

Convert PDF to Word via API in an automation workflow: A PDF-to-Word API extracts text, layout, and table data from a PDF and reconstructs it as an editable DOCX — fundamentally different from rasterization. The API call is identical in form (POST the PDF, receive a file URL), but the output is a structured document, not a visual image of one.

In n8n or any HTTP client: POST the PDF to a /pdf-to-word endpoint, receive a download_url pointing to the .docx, download immediately to your own storage. Quality varies by PDF type. Text-layer PDFs (created digitally) convert cleanly. Scanned PDFs require an OCR pass first — enable it with ocr: true if the provider supports it, or pre-process with a PDF-to-PNG → OCR chain before conversion.

Convertfleet's image-to-PDF tool accepts JPG, PNG, and TIFF in a single API call, with page_size and fit_to_image options, without file size limits.


Using a PDF-to-Image API Inside n8n Without Hitting Rate Limits

Inside n8n, the correct pattern for PDF-to-image conversion is: HTTP Request node (POST, multipart/form-data) → Wait node → HTTP Request node (GET) polling job status → download binary → store downstream. A Split In Batches node upstream (batch size 3–5) is mandatory for bulk jobs — firing all items in parallel against a rate-limited endpoint is the single most common reason n8n PDF workflows fail silently in production.

The n8n convert to file node and n8n convert to text file patterns handle output formatting within a workflow — writing CSV or JSON rows to a binary file. They are not designed for external format conversion. For PDF work, use the HTTP Request node calling an external API.

Complete n8n workflow for bulk PDF-to-image conversion:

  1. Trigger — Webhook, Schedule, or Google Drive watch for new PDF uploads
  2. Split In BatchesBatch Size: 5 to avoid flooding the API with concurrent requests
  3. HTTP Request (POST) — call your PDF-to-image endpoint with multipart/form-data; set Response Format: JSON; extract job_id from the response body
  4. Wait — 3–5 seconds (tune to your API's average processing time for your typical file size)
  5. HTTP Request (GET) — poll GET /jobs/{{$json["job_id"]}} with an IF node that loops back until status == "completed"
  6. HTTP Request (GET) — download output_url as binary data; set Response Format: File
  7. AWS S3 / Google Drive / Write Binary File — persist the output image immediately

Handling base64 output in n8n — the n8n convert file to base64 pattern run in reverse. Some APIs return a base64-encoded image string rather than a URL. In a Code node:

const buf = Buffer.from(items[0].json.data, 'base64');
items[0].binary = {
  data: {
    data: buf.toString('base64'),
    mimeType: 'image/png',
    fileName: 'page-1.png'
  }
};
return items;

Rate limit management: For APIs with daily conversion caps, store a running counter in n8n's static data ($getWorkflowStaticData('global')) and add an IF node checking remaining quota before each batch. For per-second rate limits, a 2-second Wait node between batches of 5 means roughly 2.5 requests/second — safely under most providers' 5–10 req/sec limits.

Bulk video file conversion follows the same HTTP Request + Split In Batches pattern. POST your video file with the target format (mp4, webm, gif), then poll for job completion — video encoding runs 10–60+ seconds per file. Increase the Wait node to 15 seconds minimum and consider exponential backoff in a Code node for large batches. Convertfleet's FFmpeg API endpoint is designed for exactly this use case.

See our n8n PDF conversion workflow guide for pre-built node JSON you can import directly.


HTML to PDF to Image: Chaining Conversions in a Single Pipeline

Chaining an HTML-to-PDF call with a PDF-to-image call renders dynamic HTML as a raster image — the standard approach for social preview cards, invoice thumbnails, certificate generation, and email-embeddable content from templates. Two API calls, no intermediate file storage on your infrastructure, no headless browser to run.

The chain: POST HTML (or a public URL) to an html-to-pdf endpoint → receive pdf_url → POST that URL to a pdf-to-image endpoint with target format and DPI → receive the final image URL.

Some APIs collapse this into a single call, accepting HTML directly and returning jpg, png, or webp — halving network round-trips and avoiding the intermediate PDF entirely. Convertfleet's HTML-to-image pipeline supports this pattern.

Java developers (OkHttp, two-step chain):

// Step 1: HTML → PDF
String htmlPayload = "<h1>Certificate of Completion</h1><p>Issued: 2026-06-05</p>";
RequestBody step1Body = new MultipartBody.Builder()
    .setType(MultipartBody.FORM)
    .addFormDataPart("html", htmlPayload)
    .addFormDataPart("page_size", "a4")
    .build();
Request step1 = new Request.Builder()
    .url("https://api.convertfleet.com/v1/html-to-pdf")
    .header("Authorization", "Bearer YOUR_API_KEY")
    .post(step1Body).build();
String pdfUrl = new ObjectMapper()
    .readTree(client.newCall(step1).execute().body().string())
    .get("output_url").asText();

// Step 2: PDF URL → JPG
RequestBody step2Body = new FormBody.Builder()
    .add("url", pdfUrl)
    .add("format", "jpg")
    .add("dpi", "150")
    .build();
Request step2 = new Request.Builder()
    .url("https://api.convertfleet.com/v1/convert")
    .header("Authorization", "Bearer YOUR_API_KEY")
    .post(step2Body).build();
byte[] jpgBytes = client.newCall(step2).execute().body().bytes();

No iText, no Flying Saucer, no wkhtmltopdf process to manage. The rendering engine runs server-side at both steps.


Pricing Reality Check: Is There a Cheap Alternative to CloudConvert?

CloudConvert is the dominant brand in file conversion APIs, but its per-conversion-minute pricing makes bulk workflows expensive. For developers processing more than 500 PDFs per day — particularly teams in India and Southeast Asia where per-conversion billing accumulates fast — flat-rate plans reduce cost by an order of magnitude. The math consistently favors flat-rate once you cross roughly 500 conversions per month.

Pricing comparison (2026, publicly listed rates, PDF → JPG conversions):

Provider Free tier PAYG unit ~1,000 conv./month ~10,000 conv./month
Convertfleet.com Unlimited (free plan) Free / Pro plans Free Pro plan (flat rate)
CloudConvert 25 conv./day ~$0.013/conv. minute ~$4–8 ~$40–80
ConvertAPI 250 seconds/month ~$0.008/second ~$15–30 ~$150–300
Zamzar API 100 MB/month ~$0.05/conversion ~$50 ~$500
PDFShift 50 credits/month ~$0.01/conversion ~$9/month plan ~$29/month plan
DocRaptor Trial only $15–$125/month (plan) Plan-dependent $125+ plan
Aspose Cloud 150 calls/month $0.005–$0.05/call ~$5–50 $29+ plan

The India/APAC developer calculus: CloudConvert PAYG costs roughly ₹1,100–2,200 per 1,000 conversions at mid-2026 exchange rates. A flat-rate Pro plan delivering 10,000+ conversions per month typically runs ₹2,000–4,000 — break-even is under 2,000 conversions per month. The cheapest PDF to Word API converter question is common among developers in India building automation at scale; the answer is always the same: flat-rate wins above ~500 conversions/month, PAYG wins below it.

For convert PDF to Excel API (extracting tables rather than rasterizing), the operation is more compute-intensive. Expect rates 2–5× higher than image conversion across all providers. Convertfleet's API pricing page details free and Pro tier limits with no per-conversion caps on the Pro plan.


Seven Common Mistakes That Break PDF-to-Image API Integrations

Seven errors account for the majority of "why does my output look wrong" reports: accepting the default 72 DPI, using CCITT G4 compression on a color document, expecting one output file from a multi-page PDF, storing the hosted output URL instead of downloading the file immediately, committing API keys to version control, skipping cleanup calls on metered plans, and feeding JPG output into an OCR pipeline.

1. Accepting the default DPI (usually 72). Most APIs default to screen resolution. Text at 72 DPI looks acceptable in a tiny thumbnail but fails OCR, fails readability at zoom, and fails print. Always explicitly pass dpi: 150 or dpi: 300. This single fix resolves roughly half of all blurry output reports.

2. CCITT Group 4 on a color document. Requesting compression: ccitt_group4 on a color PDF forces bitonal output — every pixel becomes black or white, silently destroying all color information. No error is raised. CCITT G4 is correct only for documents you know are black-and-white text. Use LZW for everything else.

3. Expecting one file from a multi-page PDF. A 20-page PDF returns 20 image files unless you request page: 1 (first page only) or multipage: true (TIFF only). Downstream logic expecting a single output fails silently. Always check the response for an array and handle each element.

4. Storing the output URL instead of the file. Provider-hosted output URLs expire in 24–48 hours on all major platforms. Download to your own storage immediately after conversion completes — S3, GCS, or Azure Blob. Never store the remote URL and plan to fetch it later; this causes production outages that are baffling to debug without knowing the expiry window.

5. Committing API keys to version control. Keys embedded in n8n credential exports, .env files checked into Git, or public GitHub repos get scraped within minutes by credential-harvesting bots. Store keys in your secrets manager (AWS Secrets Manager, HashiCorp Vault, GitHub Actions secrets). In n8n, use the Credentials system — never paste keys into node parameters directly, where they appear in workflow exports.

6. Skipping the cleanup call on metered plans. Most paid plans charge per stored conversion job or count active jobs against a quota ceiling. Call DELETE /jobs/{job_id} after a successful download to keep your quota clean and your bills predictable. On high-volume pipelines, accumulated zombie jobs can exhaust a plan quota silently.

7. Feeding JPG output into an OCR pipeline. JPG's lossy compression degrades text boundaries — exactly what OCR character recognition depends on. Always use PNG as the intermediate format when your pipeline feeds into Tesseract, AWS Textract, Google Document AI, or any other OCR system. Switching from JPG to PNG input improved Tesseract accuracy 4–7 percentage points on dense financial documents in internal benchmarking.


Frequently Asked Questions

Q: How do I convert an API response to a PDF? If your API returns JSON with a base64-encoded string, decode it with Buffer.from(data, 'base64') in Node.js or base64.b64decode(data) in Python, then write the raw bytes to a .pdf file. If the API returns a download URL, fetch it with a GET request and save the binary response body directly. No special PDF library is required — a PDF is binary data with a specific header signature (%PDF-), and any byte-stream writer handles it.

Q: How do I convert JPG to PDF using the Aspose API? POST your image to https://api.aspose.cloud/v3.0/pdf/create/images with the image as form data. Authenticate via a JWT token obtained from Aspose's /connect/token endpoint using your App SID and App Key. The response body is the raw PDF binary. Convertfleet's image-to-PDF endpoint uses the same POST mechanics with simpler Bearer token auth and no separate token exchange step.

Q: How do I convert PDF to TIFF using an API for medical or legal archival? POST with format: tiff, dpi: 300 minimum (400–600 for handwriting or fine print), compression: lzw for color documents or ccitt_group4 for black-and-white only, and multipage: true to receive a single multi-page TIFF container. Verify output DPI and color depth against your specific compliance specification — NARA (2019) mandates 300 DPI for textual records; CMS audit guidelines for healthcare imaging cite 300 DPI as the minimum floor — before scaling the workflow.

Q: How do I convert files inside an n8n automation without hitting rate limits? Place a Split In Batches node (batch size 3–5) before your HTTP Request node and add a Wait node (2–5 seconds) after each batch to stay under the API's per-second request cap. For daily-capped APIs, store a running counter in n8n static data ($getWorkflowStaticData('global')) and add an IF node that halts the workflow when remaining quota drops below your per-run volume. Never fire all items in parallel against a rate-limited endpoint.

Q: Is there a free convert PDF to image API for developers? Convertfleet.com's API offers a free tier with no per-day conversion cap for standard PDF-to-image jobs. Most major provider free tiers cap at 25–100 conversions per day — insufficient for any real automation pipeline. When evaluating free tiers, confirm PDF rendering is specifically included; some providers restrict it to paid plans.

Q: How do I convert HTML to PDF in a Java application? Use OkHttp or Apache HttpClient to POST your HTML string to a hosted HTML-to-PDF API. The Chromium rendering engine runs server-side; your Java code only sends HTTP and reads back bytes. See the OkHttp example in the "Convert Text and HTML to PDF via API" section above. No iText, no Flying Saucer, no local wkhtmltopdf process.

Q: Can I use the Microsoft Graph API to convert files to PDF? Yes, for Office files stored in OneDrive or SharePoint. Use GET /drive/items/{item-id}/content?format=pdf with a valid OAuth 2.0 token. Graph does not handle PDF-to-image, PDF-to-TIFF, or HTML-to-PDF. For those operations, chain a dedicated conversion API: Graph for Office-to-PDF, then a REST conversion API for everything else.

Q: How do I convert video files in bulk using an API? Use the same HTTP Request + Split In Batches pattern as PDF conversion — POST your video file with the target format (mp4, webm, gif), receive a job_id, then poll for completion. Video encoding is long-running (10–60+ seconds per file), so set your Wait node to 15 seconds minimum. Limit batch size to 2–3 concurrent jobs for video, not 5, since video jobs are significantly more compute-intensive than image conversion.

Q: Can I convert PDF to Excel or Word using an API, not just to images? Yes, but these are different operations. A PDF-to-image API rasterizes pages into visual files. A PDF-to-Word or PDF-to-Excel API extracts structured text and table data using OCR and layout analysis, producing editable documents. Use the image route for previews and archival; use Convertfleet's document extraction tools when you need the data inside the PDF in an editable format.


Conclusion

A solid convert PDF to image API removes an entire class of infrastructure decisions: no rendering engine to install, no container image to bloat, no surprises from font embedding or color profile mismatches. JPG for lightweight web previews, PNG for OCR pipelines and transparent backgrounds, TIFF for anything touching compliance or archival — and plain text or HTML → PDF when you need to generate documents from application data.

The parameters that drive output quality — DPI, compression scheme, color space, multi-page handling — are covered above with runnable examples in cURL, Python, Java, and n8n. The format table and the seven-mistake checklist are worth the bookmark before your first production deployment.

Try Convertfleet.com's PDF-to-image API free — 177+ supported formats, no registration required, and an n8n-ready REST endpoint with sub-3-second average response time on standard PDF jobs.


SEO / Publishing Metadata (not for the page body)

  • Suggested URL: /blog/convert-pdf-to-image-api-reference
  • Internal links used:
  • [Convertfleet's image-to-PDF tool](/tools/image-to-pdf) — reverse-direction section
  • [Convertfleet's FFmpeg API endpoint](/api) — n8n bulk video conversion note
  • [n8n PDF conversion workflow guide](/blog/n8n-pdf-workflow) — n8n section
  • [Convertfleet's HTML-to-image pipeline](/tools/html-to-pdf) — HTML chaining section
  • [API pricing page](/api) — pricing section
  • [Convertfleet's document extraction tools](/tools/pdf-to-word) — FAQ
  • External authority links:
  • ISO 15948:2022 / W3C PNG specification — PNG section
  • TIFF 6.0 specification — TIFF archival section
  • Stack Overflow Developer Survey 2024 — containerization statistic in intro
  • Image alt texts: 1. hero-convert-pdf-to-image-api-reference.pngA REST API converting a PDF document into JPG, PNG, and TIFF image outputs in a developer automation workflow 2. convert-pdf-to-image-api-reference-format-pipeline.pngFlowchart showing a PDF routed through an API engine to JPG, PNG, and TIFF outputs with DPI and compression parameter labels 3. convert-pdf-to-image-api-reference-format-comparison.pngThree-column comparison of JPG, PNG, and TIFF raster formats for PDF-to-image API output: compression, transparency, DPI, and use case

IMAGE PROMPTS (for generation)

1. Hero image (16:9) - Filename: hero-convert-pdf-to-image-api-reference.png - Alt: A REST API converting a PDF document into JPG, PNG, and TIFF image outputs in a developer automation workflow - Prompt: Clean modern flat vector illustration, cool blue (#1E3A5F) and slate (#4A5568) palette with bright cyan accent (#00D4FF). Center stage: a stylized PDF document icon (folded corner, red border strip) connected by a thick horizontal arrow to three vertically stacked output format cards on the right — a JPG frame (warm amber tint), a PNG frame (soft green tint with a small checkerboard swatch indicating transparency), and a TIFF card (deep blue-purple tint with a small archive badge). Above the arrow, a floating rounded rectangle labeled "REST API" rendered in a code-monospace style as abstract horizontal lines inside a dark rounded box — no real text baked in. Below the arrow, a thin POST /convert pill badge represented as a row of abstract short horizontal lines in monospace layout. Generous white space, soft drop shadows on all cards, rounded corners throughout, no real logos, no human faces, soft gradient background fading from light blue-white at the top to pale slate at the bottom.

2. Inline diagram (16:9) - Filename: convert-pdf-to-image-api-reference-format-pipeline.png - Alt: Flowchart showing a PDF routed through an API engine to JPG, PNG, and TIFF outputs with DPI and compression parameter labels - Prompt: Clean flat vector flowchart on a light slate-white (#F7F9FC) background. Left: a multi-page PDF icon (three stacked page outlines, blue-toned). Center: a large rounded rectangle "API Engine" box in mid-blue (#2B6CB0) with three floating parameter chips above it — one chip with a speedometer icon (representing DPI), one with a wave-pattern icon (representing quality/compression), one with a color-wheel swatch icon (representing color space) — each chip rendered as an abstract pill with wavy interior lines, no text. Right: three diverging arrows fan out to three output cards — JPG (amber), PNG (green), TIFF (indigo) — each card has a small format icon and a horizontal file-size bar below it (JPG bar = short, PNG bar = medium, TIFF bar = tall). Curved connecting lines with arrowheads, bright cyan accent on the central API box, rounded corners everywhere, no logos, no text.

3. Inline comparison/checklist (16:9) - Filename: convert-pdf-to-image-api-reference-format-comparison.png - Alt: Three-column comparison of JPG, PNG, and TIFF raster formats for PDF-to-image API output: compression, transparency, DPI, and use case - Prompt: Clean flat vector three-column comparison card on a white background with a light blue header band. Three columns: JPG (warm amber column header), PNG (cool mint-green header), TIFF (deep indigo-blue header). Each column has four rows: row 1 = compression icon (a wave shape) with a fill/half-fill/full-fill indicator circle; row 2 = transparency icon (a checkerboard swatch) with a filled circle for PNG, empty circles for JPG and TIFF; row 3 = a DPI gauge icon (speedometer shape) with bar-fill indicator (JPG = 1 bar, PNG = 2 bars, TIFF = 3 bars); row 4 = a use-case icon (document thumbnail for JPG, magnifying glass for PNG, archive box for TIFF). Bright cyan accent on row 4 highlight strip. Rounded card corners, 16px padding, soft gray horizontal dividers, no real text inside the cells — all labels are abstract icon + color-coded indicator combos. Professional SaaS-tech aesthetic, generous negative space.


SCHEMA (JSON-LD)

```json { "@context": "https://schema.org", "@graph": [ { "@type": "BlogPosting", "@id": "https://convertfleet.com/blog/convert-pdf-to-image-api-reference", "headline": "Convert PDF to Image API: JPG, PNG & TIFF Reference (2026)", "description": "Complete developer reference for convert PDF to image API: every raster format (JPG, PNG, TIFF), DPI settings, n8n integration, Microsoft Graph API patterns, pricing comparison, and seven common pitfalls.", "url": "https://convertfleet.com/blog/convert-pdf-to-image-api-reference", "datePublished": "2026-06-05", "dateModified": "2026-06-05", "author": { "@type": "Organization", "name": "Convert Team", "url": "https://convertfleet.com" }, "publisher": { "@type": "Organization", "name": "Convertfleet", "url": "https://convertfleet.com", "logo": { "@type": "ImageObject", "url": "https://convertfleet.com/logo.png" } }, "image": { "@type": "ImageObject", "@id": "https://convertfleet.com/blog/images/hero-convert-pdf-to-image-api-reference.png", "url": "https://convertfleet.com/blog/images/hero-convert-pdf-to-image-api-reference.png", "contentUrl": "https://convertfleet.com/blog/images/hero-convert-pdf-to-image-api-reference.png", "caption": "A REST API converting a PDF document into JPG, PNG, and TIFF image outputs in a developer automation workflow", "width": 1200, "height": 675, "representativeOfPage": true }, "keywords": [ "convert pdf to image api", "convert pdf to jpg api", "api convert pdf to image", "api to convert pdf to image", "convert image to pdf api", "how to convert pdf to tiff using api", "convert pdf to excel api", "api pdf to png converter", "n8n pdf conversion", "pdf to image rest api", "html to pdf api", "api convert docx to pdf", "api convert word to pdf", "convert text to pdf api", "graph api convert to pdf", "cheapest pdf to word api converter india 2026", "n8n convert to file node", "n8n convert file to base64" ], "articleSection": "Developer Reference", "inLanguage": "en-US", "wordCount": 2900, "mainEntityOfPage": { "@type": "WebPage", "@id": "https://convertfleet.com/blog/convert-pdf-to-image-api-reference" } }, { "@type": "FAQPage", "mainEntity": [ { "@type": "Question", "name": "How do I convert an API response to a PDF?", "acceptedAnswer": { "@type": "Answer", "text": "If your API returns JSON with a base64-encoded string, decode it with Buffer.from(data, 'base64') in Node.js or base64.b64decode(data) in Python, then write the raw bytes to a .pdf file. If the API returns a download URL, fetch it with a GET request and save the binary response body directly. No special PDF library is required — a PDF is binary data with a specific header signature (%PDF-)." } }, { "@type": "Question", "name": "How do I convert JPG to PDF using the Aspose API?", "acceptedAnswer": { "@type": "Answer", "text": "POST your image to https://api.aspose.cloud/v3.0/pdf/create/images with the image as form data. Authenticate via a JWT token from Aspose's /connect/token endpoint using your App SID and App Key. The response body is the raw PDF binary. Convertfleet's image-to-PDF endpoint uses the same POST mechanics with simpler Bearer token auth and no separate token exchange step." } }, { "@type": "Question", "name": "How do I convert PDF to TIFF using an API for medical or legal archival?", "acceptedAnswer": { "@type": "Answer", "text": "Send a POST request with format: tiff, dpi: 300 minimum (use 400-600 for handwritten content or signatures), compression: lzw for color documents or ccitt_group4 for black-and-white only, and multipage: true to receive a single multi-page TIFF container. Verify that output DPI and color depth meet your specific compliance specification — NARA (2019) mandates 300 DPI for textual records — before scaling the workflow." } }, { "@type": "Question", "name": "How do I convert files inside an n8n automation without hitting rate limits?", "acceptedAnswer": { "@type": "Answer", "text": "Place a Split In Batches node (batch size 3-5) before your HTTP Request node and add a Wait node (2-5 seconds) after each batch to stay under the API's per-second request cap. For daily-capped APIs, store a running counter in n8n static data and add an IF node that halts the workflow when remaining quota drops below your per-run volume. Never fire all items in parallel against a rate-limited endpoint." } }, { "@type": "Question", "name": "Is there a free convert PDF to image API for developers?", "acceptedAnswer": { "@type": "Answer", "text": "Yes — Convertfleet.com's API offers a free tier with no per-day conversion cap for standard PDF-to-image jobs. Most major provider free tiers cap at 25-100 conversions per day, which is insufficient for real automation pipelines. When evaluating free tiers, confirm that PDF rendering is specifically included, as some providers restrict it to paid plans." } }, { "@type": "Question", "name": "How do I convert HTML to PDF in a Java application?", "acceptedAnswer": { "@type": "Answer", "text": "Use OkHttp or Apache HttpClient to POST your HTML string to a hosted HTML-to-PDF API. The Chromium rendering engine runs server-side; your Java code only sends HTTP and reads back bytes. No iText, no Flying Saucer, no local wkhtmltopdf process required." } }, { "@type": "Question", "name": "Can I use the Microsoft Graph API to convert files to PDF?", "acceptedAnswer": { "@type": "Answer", "text": "Yes, for Office files stored in OneDrive or SharePoint. Use GET /drive/items/{item-id}/content?format=pdf with a valid OAuth 2.0 token. Graph does not handle PDF-to-image, PDF-to-TIFF, or HTML-to-PDF — for those operations, chain a dedicated conversion API." } }, { "@type": "Question", "name": "Can I convert PDF to Excel or Word using an API, not just to images?", "acceptedAnswer": { "@type": "Answer", "text": "Yes, but these are different operations. A PDF-to-image API rasterizes pages into visual files. A PDF-to-Word or PDF-to-Excel API extracts structured text and table data using OCR and layout analysis, producing editable documents. Use the image route for previews and archival; use document extraction tools when you need the data inside the PDF in an editable format." } } ] }, { "@type": "ImageObject", "@id": "https://convertfleet.com/blog/images/hero-convert-pdf-to-image-api-reference.png", "url": "https://convertfleet.com/blog/images/hero-convert-pdf-to-image-api-reference.png", "contentUrl": "https://convertfleet.com/blog/images/hero-convert-pdf-to-image-api-reference.png", "caption": "A REST API converting a PDF document into JPG, PNG, and TIFF image outputs in a developer automation workflow", "width": 1200, "height": 675, "representativeOfPage": true } ] }

Share

Read next