Expand description
rpdfium — a faithful Rust port of Google’s PDFium PDF rendering engine.
Re-exports§
pub use arc::ArcDocument;pub use arc::ArcLibrary;pub use arc::ArcPage;
Modules§
- arc
- Arc-based wrappers for WASM and async use cases.
Structs§
- Annotation
- A PDF annotation parsed from a page’s
/Annotsarray. - Annotation
Border - Annotation border specification.
- Annotation
Flags - Annotation flags (ISO 32000-2 section 12.5.3, Table 165).
- Annotation
Subtype Data - Subtype-specific annotation data.
- Bitmap
- A bitmap image buffer.
- Bookmark
- A single bookmark entry in the document outline.
- Char
Origin - Page-space origin of a character (upstream
CFX_PointFfromCharInfo::origin_). - Char
Rect - Bounding rectangle for a character or merged selection region.
- Color
- A color value with components in the current color space.
- Color
Scheme - Forced color scheme for accessibility rendering (high-contrast mode). Corresponds to CPDF_RenderOptions::ColorScheme.
- Document
- A parsed PDF document, borrowing from the
Library. - Document
Metadata - Document metadata extracted from the
/Infodictionary. - Elements
ForPage - An iterator over structure elements that reference a specific page.
- FdfData
- In-memory FDF (Forms Data Format) data.
- File
Spec - A parsed PDF file specification dictionary.
- Folder
Font Scanner - Scans system font directories for matching fonts.
- Font
Match - Result of a font lookup.
- Font
Request - Request describing the font to find.
- Form
Field Flags - Form field flag bits (
/Ff). - Glyph
Usage Tracker - Tracks which glyphs have been used during text layout.
- HitTest
Result - Result of a link hit test.
- Interactive
Form - A parsed interactive form (AcroForm).
- Java
Script Action - A document-level JavaScript action entry.
- Library
- The top-level library instance.
- Link
- A link extracted from page text.
- Link
Object - A typed view of a link annotation for introspection.
- Matrix
- A 2D affine transformation matrix.
- Mcid
Mapping - Mapping from (page ObjectId, MCID) to structure element information.
- Name
- A PDF name object.
- Name
Tree - A parsed name tree mapping string keys to values of type
V. - Number
Tree - A parsed number tree mapping integer keys to values of type
V. - OCContext
- Optional content visibility context.
- Object
Id - Unique identifier for a PDF indirect object.
- Open
Options - Options for opening a PDF document.
- Page
- A single page within a
Document. - Page
Label - A page label specification that applies from a given page index onward.
- Page
Structure - Structure elements filtered for a specific page.
- PdfString
- A PDF string with encoding-aware conversion.
- PdfVersion
- PDF file version extracted from the header.
- Point
- A point in 2D space.
- Rect
- A rectangle in PDF coordinate space.
- Render
Config - Configuration for rendering a page to a bitmap.
- Rgba
Color - An RGBA color value with 8 bits per component.
- Search
Options - Options for text search (upstream
FPDF_SEARCH_FLAGS). - Search
Result - A search result with start/end character indices and the matched text.
- Signature
Object - A digital signature field parsed from a PDF’s AcroForm.
- Size
- A size with width and height.
- Struct
Attribute - A single attribute dictionary associated with a structure element.
- Struct
Element - A single node in the structure tree.
- Struct
Tree - The parsed structure tree of a tagged PDF document.
- Text
Character - A single extracted character with its position, size, and font metadata.
- Text
Extractor - Extracts text characters from a
DisplayTreeby visiting text nodes. - Text
Page - Extracted text from a single PDF page, with character-level position data.
- Text
Page Find - Stateful text search matching upstream PDFium’s
CPDF_TextPageFind. - Viewer
Preferences - Parsed viewer preferences from the
/ViewerPreferencesdictionary.
Enums§
- Action
- A PDF action associated with a bookmark, link, or other trigger.
- Action
Type - Coarse action type classification matching
PDFACTION_*constants in PDFium’sfpdf_doc.h. - Annotation
Type - Annotation subtypes defined by the PDF specification.
- Attribute
Value - A value in a structure attribute dictionary.
- Bitmap
Format - Pixel format for bitmap data.
- Border
Style - Border styles for annotations.
- Char
Type - Destination
- A destination within a PDF document.
- Display
Node - A node in the display tree.
- DocError
- Errors that can occur during document structure parsing.
- DocMdp
Permission - The DocMDP (Modification Detection and Prevention) permission level.
- Duplex
Mode - Duplex printing mode.
- Error
- Unified error type for the rpdfium facade.
- Field
Value - A typed value that can be set on a form field.
- File
Identifier Type - Selects which of the two PDF file identifiers to retrieve.
- Font
Weight - Font weight classification.
- Link
Kind - The kind of extracted link.
- Object
- A PDF object value.
- Page
Action Type - Event type for page-level additional actions (
/AAon a page dict). - Page
Error - Errors that can occur during page interpretation and traversal.
- PageFit
- How a page should be displayed when navigating to a destination.
- Page
Label Style - The numbering style for page labels.
- Page
Mode - The initial display mode for the document’s pages.
- Parse
Error - Syntax-level parse error for PDF objects.
- Parsing
Mode - Parsing mode controlling how strictly the PDF specification is enforced.
- PdfError
- Top-level error type for rpdfium operations.
- PdfForm
Type - The type of interactive form contained in a PDF document.
- PdfString
Encoding - The encoding used by a
PdfString. - Reading
Direction - Reading direction for the document.
- Render
Error - Errors that can occur during rendering.
- Stream
Data - Represents the raw (undecoded) data of a PDF stream.
- Usage
Type - The intended use for the content visibility evaluation.
Traits§
- Display
Visitor - Visitor trait for traversing the display tree.
- Font
Mapper - Trait for finding system fonts.
- PdfReader
- Custom PDF data source, equivalent to
FPDF_FILEACCESS.
Functions§
- base14_
substitute - Map a Base-14 PostScript font name to a common system font family name.
- collect_
attachments - Collect all embedded file attachments from the document catalog.
- collect_
javascript_ actions - Collect all JavaScript actions from a document catalog.
- collect_
links - Collect all link annotations from a page’s annotation list.
- collect_
named_ destinations - Collects all named destinations from the document catalog.
- collect_
signatures - Collect all digital signature fields from the document’s AcroForm.
- compute_
page_ transform - Compute a transformation matrix from PDF page coordinates to device pixels.
- device_
to_ page - Convert device (pixel) coordinates to PDF page coordinates.
- enumerate
Deprecated - Deprecated: use
link_enumerate()orcollect_links()instead. - enumerate_
links Deprecated - Deprecated: use
link_enumerate()orcollect_links()instead. - export_
fdf - Export all field values from an interactive form into FDF data.
- extract_
links - Extract links from text. O(n) scan.
- find_
bookmark - Search for the first bookmark with the given title using iterative DFS.
- find_
link_ at_ position - Find a link annotation at the given point.
- format_
label - Format a page label for the given page offset within its range.
- get_
bookmark_ by_ title Deprecated - Non-upstream alias — use
find_bookmark()instead. - get_
link_ at_ point Deprecated - Deprecated: use
link_get_link_at_point()orlink_at_point()instead. - import_
fdf - Import FDF data into an interactive form, updating matching fields.
- is_
tagged - Returns
trueif the document is a tagged PDF. - link_
at_ point - Find a link annotation at the given point and return it as a
LinkObject. - link_
enumerate - ADR-019 alias for
collect_links. - link_
get_ link_ at_ point - ADR-019 alias for
link_at_point(). - next_
sibling_ bookmark - Returns the next sibling of
bookmarkwithinsiblings, orNoneifbookmarkis the last in the slice. - page_
mode - Returns the document’s page mode from the catalog
/PageModeentry. - page_
to_ device - Convert PDF page coordinates to device (pixel) coordinates.
- parse_
annotations - Parse all annotations from a page’s
/Annotsarray. - parse_
bookmarks - Parse the bookmark tree from the document catalog.
- parse_
destination - Parse a destination from a PDF object.
- parse_
metadata - Parse document metadata from an
/Infodictionary object. - parse_
page_ labels - Parse page labels from the document catalog’s
/PageLabelsentry. - render
- Render a display tree to a bitmap using the default backend.
- render_
with_ images - Render a display tree with image decoding support.
- search
- Search for all occurrences of
queryintext(case-sensitive). - search_
case_ insensitive - Search for all occurrences of
queryintext(case-insensitive). - search_
consecutive - Search for all overlapping (consecutive) occurrences of
queryintext. - search_
normalized - Search for all occurrences of
queryintextwith NFC normalization applied to both inputs before comparison. - search_
normalized_ case_ insensitive - Search for all occurrences of
queryintextwith NFC normalization and case-insensitive comparison. - search_
whole_ word - Search for all whole-word occurrences of
queryintext(case-sensitive). - search_
whole_ word_ case_ insensitive - Search for all whole-word occurrences of
queryintext(case-insensitive). - segment_
lines - Segment a sequence of characters into lines by grouping on y-position.
- segment_
words - Segment a sequence of characters into words by detecting gaps.
- subset_
truetype_ font - Subset a TrueType font to include only the specified glyphs.