Skip to main content

Crate rpdfium_doc

Crate rpdfium_doc 

Source
Expand description

Document-level features for rpdfium — a faithful Rust port of PDFium.

This crate provides document structure types and parsers for PDF features beyond individual page content:

  • Name trees and number trees — generic sorted-key lookup structures
  • Bookmarks (outlines) — the hierarchical table of contents
  • Document metadata — title, author, dates from the /Info dictionary
  • Destinations and actions — navigation targets and interactive behaviors
  • Page labels — custom page numbering (roman, alphabetic, prefixed)
  • Annotations — interactive elements on pages (links, highlights, stamps, etc.)

Re-exports§

pub use aaction::AActionType;
pub use aaction::AdditionalActions;
pub use aaction::parse_additional_actions;
pub use action::Action;
pub use action::ActionChain;
pub use action::ActionType;
pub use action::parse_action_chain;
pub use annot_list::annot_get_form_field_at_point;
pub use annot_list::annotation_at_point;
pub use annot_list::find_parent_annotation;
pub use annot_list::parse_annotations;
pub use annot_list::get_annotation_at_point;Deprecated
pub use annot_list::get_form_field_at_point;Deprecated
pub use annotation::Annotation;
pub use annotation::AnnotationBorder;
pub use annotation::AnnotationFlags;
pub use annotation::AnnotationSubtypeData;
pub use annotation::AnnotationType;
pub use annotation::AppearanceMode;
pub use annotation::BorderStyle;
pub use annotation::PdfValueType;
pub use annotation_appearance::AnnotationAppearance;
pub use ap_settings::IconProperties;
pub use ap_settings::MkDict;
pub use ap_settings::parse_icon_properties;
pub use ap_settings::parse_mk_dict;
pub use ba_font_map::BaFontMap;
pub use ba_font_map::BaFontMapEntry;
pub use ba_font_map::parse_default_appearance_font;
pub use bookmark::get_bookmark_by_title;Deprecated
pub use bookmark::Bookmark;
pub use bookmark::find_bookmark;
pub use bookmark::next_sibling_bookmark;
pub use bookmark_tree::parse_bookmarks;
pub use catalog::get_pdf_form_type;Deprecated
pub use catalog::PageMode;
pub use catalog::PdfFormType;
pub use catalog::get_form_type;
pub use catalog::is_tagged;
pub use catalog::page_mode;
pub use catalog::pdf_form_type;
pub use destination::Destination;
pub use destination::PageFit;
pub use destination::collect_named_destinations;
pub use destination::parse_destination;
pub use error::DocError;
pub use error::DocResult;
pub use fdf::FdfData;
pub use fdf::export_fdf;
pub use fdf::import_fdf;
pub use file_spec::FileSpec;
pub use file_spec::collect_attachments;
pub use file_spec::decode_filename;
pub use file_spec::encode_filename;
pub use file_spec::parse_file_spec;
pub use form_control::FormControl;
pub use form_control::HighlightingMode;
pub use form_control::TextPosition;
pub use form_field::ChoiceOption;
pub use form_field::FieldValue;
pub use form_field::FormField;
pub use form_field::FormFieldFlags;
pub use form_field::FormFieldType;
pub use generate_ap::generate_annot_ap;
pub use generate_ap::generate_annotation_appearance;
pub use generate_ap::generate_empty_ap;
pub use icon_fit::IconFit;
pub use icon_fit::ScaleMethod;
pub use interactive_form::InteractiveForm;
pub use javascript::JavaScriptAction;
pub use javascript::collect_javascript_actions;
pub use link_list::HitTestResult;
pub use link_list::LinkObject;
pub use link_list::enumerate;Deprecated
pub use metadata::DocumentMetadata;
pub use metadata::parse_metadata;
pub use name_tree::NameTree;
pub use number_tree::NumberTree;
pub use page_label::PageLabel;
pub use page_label::PageLabelStyle;
pub use page_label::format_label;
pub use page_label::parse_page_labels;
pub use signature::DocMdpPermission;
pub use signature::SignatureObject;
pub use signature::collect_signatures;
pub use struct_element::AttributeValue;
pub use struct_element::StructAttribute;
pub use struct_element::StructElement;
pub use struct_tree::ElementsForPage;
pub use struct_tree::McidMapping;
pub use struct_tree::PageStructure;
pub use struct_tree::StructTree;
pub use struct_tree::find_elements_for_mcid;
pub use variable_text::Alignment;
pub use variable_text::Line;
pub use variable_text::LineInfo;
pub use variable_text::Section;
pub use variable_text::VariableText;
pub use variable_text::VtFontProvider;
pub use variable_text::VtIterator;
pub use variable_text::VtWordIterator;
pub use variable_text::Word;
pub use variable_text::WordInfo;
pub use variable_text::WordPlace;
pub use variable_text::WordRange;
pub use viewer_preferences::DuplexMode;
pub use viewer_preferences::ReadingDirection;
pub use viewer_preferences::ViewerPreferences;
pub use xmp::SharedFormType;
pub use xmp::XmpMetadata;
pub use xmp::check_for_shared_form;

Modules§

aaction
Additional actions dictionary (/AA) — event-triggered action mapping.
action
PDF action types (ISO 32000-2 section 12.6).
annot_list
Annotation list parsing — CPDF_AnnotList.
annotation
PDF annotation types and parsing — CPDF_Annot (ISO 32000-2 section 12.5).
annotation_appearance
Annotation appearance stream extraction (ISO 32000-2 section 12.5.5).
ap_settings
Widget annotation appearance characteristics dictionary (/MK).
ba_font_map
Form field font mapping (/DR + /DA resolution).
bookmark
Bookmark (outline) entry — CPDF_Bookmark.
bookmark_tree
Bookmark tree traversal (CPDF_BookmarkTree).
catalog
Catalog-level document properties: tagged-PDF detection, page mode, and form type.
default_appearance
Appearance stream generation for interactive form fields.
destination
PDF destination types (ISO 32000-2 section 12.3.2).
error
Error types for the rpdfium-doc crate.
fdf
FDF (Forms Data Format) import and export.
file_spec
PDF file specification dictionary (ISO 32000-2 section 7.11).
form_control
Form controls (widgets) — visual representations of form fields on pages.
form_field
Form field types — Text, Button, Choice, Signature field parsing.
generate_ap
Automatic appearance stream generation for annotations.
icon_fit
Icon fit parameters for widget annotation buttons (/IF dictionary).
interactive_form
Interactive forms (AcroForm) — read-only field parsing and value extraction.
javascript
Document-level JavaScript actions (PDF /Names//JavaScript name tree).
link
Link annotation accessor — CPDF_Link.
link_list
Link annotation hit testing and link object introspection.
metadata
Document metadata from the PDF /Info dictionary (ISO 32000-2 section 14.3.3).
name_tree
PDF name tree parser (ISO 32000-2 section 7.9.6).
number_tree
PDF number tree parser (ISO 32000-2 section 7.9.7).
page_label
Page label parsing and formatting (ISO 32000-2 section 12.4.2).
signature
Digital signature field enumeration and metadata extraction.
struct_element
Structure element — CPDF_StructElement.
struct_tree
Tagged PDF structure tree — CPDF_StructTree.
variable_text
Variable text layout engine and supporting types.
viewer_preferences
Viewer preferences (ISO 32000-2 section 12.2).
xmp
XMP metadata extraction from PDF streams.