Solutions

Render PDFs to images, anywhere.

Convert PDF pages to PNG, JPEG, or WebP with sub-pixel accuracy. Runs server-side, in Lambda, or via WASM.

Code example

rust
use pdfluent::{Sdk, RenderOptions, ImageFormat};

fn main() -> pdfluent::Result<()> {
    let sdk = Sdk::new()?;
    let doc = sdk.open("input.pdf")?;

    let opts = RenderOptions::builder()
        .dpi(150)
        .format(ImageFormat::Png)
        .build();

    let image = doc.render_page(0, opts)?;
    image.save("page-0.png")?;

    println!("Rendered {} bytes", image.len());
    Ok(())
}

Run cargo add pdfluent to get started.

What it does

DPI control

Render at any DPI from 72 to 600. Set DPI per-page or globally. Output pixel dimensions scale exactly with the DPI value you specify.

Color space handling

Outputs sRGB by default. Supports CMYK-to-RGB conversion and grayscale rendering. Color profiles embedded in the PDF are honored during conversion.

Partial page rendering

Render a specific crop box region instead of the full page. Pass a rectangle in PDF user space coordinates. Useful for extracting figures or thumbnails from a section of a page.

WASM rendering

The same render API compiles to WebAssembly. Run PDF-to-image conversion in the browser or in Cloudflare Workers without any server round-trip.

Multi-page batch

Render all pages in a loop or in parallel using Rayon. Each call to render_page is stateless and thread-safe. Typical throughput is 80-120 pages per second at 96 DPI on a 4-core machine.

No display server required

PDFluent does not call X11, Wayland, CoreGraphics, or any OS display API. It works on headless Linux servers, in containers, and in Lambda without extra configuration.

Deployment options

Server-side (Linux/macOS/Windows)AWS LambdaCloudflare Workers (WASM)DockerKubernetes

Frequently asked questions