Skip to main content

Crate rpdfium_render

Crate rpdfium_render 

Source
Expand description

Rendering pipeline for rpdfium — a faithful Rust port of PDFium.

This crate provides the rendering pipeline that converts a DisplayTree (built by rpdfium-page) into a pixel bitmap:

rpdfium-page:   Vec<Operator> → DisplayTree  (interpretation)
rpdfium-render: DisplayTree   → Bitmap       (rendering — this crate)

Re-exports§

pub use annotation_render::AnnotationOverlay;
pub use annotation_render::render_with_annotations;
pub use cfx_defaultrenderdevice::TinySkiaBackend;
pub use cfx_psrenderer::PsRenderBackend;
pub use cfx_psrenderer::PsSurface;
pub use cfx_renderdevice::render;
pub use cfx_renderdevice::render_tiled;
pub use cfx_renderdevice::render_tiled_with_images;
pub use cfx_renderdevice::render_with_images;
pub use color_convert::RgbaColor;
pub use error::RenderError;
pub use image::DecodedImage;
pub use image::DecodedImageFormat;
pub use image::ImageDecoder;
pub use page_transform::compute_page_transform;
pub use render_defines::ColorScheme;
pub use render_defines::RenderConfig;
pub use render_defines::RenderProgress;
pub use renderdevicedriver_iface::RenderBackend;
pub use stroke::StrokeStyle;

Modules§

annotation_render
Annotation rendering support.
cfx_cmyk_to_srgb
Adobe CMYK to sRGB conversion using a precomputed 4D lookup table.
cfx_defaultrenderdevice
tiny-skia implementation of the RenderBackend trait.
cfx_glyphcache
Rasterized glyph cache — caches pre-rendered glyph bitmaps for fast text rendering at common sizes.
cfx_psrenderer
PostScript Level 2/3 rendering backend.
cfx_renderdevice
Public rendering API.
color_convert
Color space conversion from PDF color values to device RGBA.
error
Error types for the rendering pipeline.
image
Decoded image types and the image decoder trait.
page_transform
Page coordinate transformation from PDF space to device pixels.
render_defines
Render configuration for controlling output dimensions and background.
render_shading
Shading (gradient) rendering.
renderdevicedriver_iface
Render backend trait defining the interface for 2D rendering engines.
renderer
Display tree renderer that bridges DisplayVisitor to RenderBackend.
stroke
Stroke style conversion from PDF path styles.
type3_cache
Cache for Type 3 glyph outlines.
type3_glyph_map
Per-glyph data for Type 3 font rendering.