RenderOptions (vision/render.rs)

pdf-inspector · src/vision/render.rs · rust · MIT
files

Defines rendering options, pixel formats, and page transforms for PDF rendering pipelines.

// Source: https://github.com/firecrawl/pdf-inspector | License: MIT | Copyright 2026 Firecrawl
// Provided via justclaw.it.com; keep this notice with the code.
//! Renderer-neutral page bitmap and coordinate types.

use thiserror::Error;

use crate::PdfRect;

/// Default rendering resolution for OCR.
pub const DEFAULT_RENDER_DPI: f32 = 150.0;

/// Default maximum size of one rendered page: 256 MiB.
pub const DEFAULT_MAX_OUTPUT_BYTES: u64 = 256 * 1024 * 1024;

/// Pixel layout returned by [`RenderedPage`].
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)]
#[non_exhaustive]
pub enum RenderPixelFormat {
    /// Three bytes per pixel in red, green, blue order. This is the default
    /// because OCR preprocessors conventionally consume RGB images.
    #[default]
    Rgb8,
    /// Four byt

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key