Module objects

Source
Expand description

PDF Object Parser - Core PDF data types and parsing

This module implements parsing of all PDF object types according to ISO 32000-1 Section 7.3. PDF files are built from a small set of basic object types that can be combined to form complex data structures.

§Object Types

PDF supports the following basic object types:

  • Null: Represents an undefined value
  • Boolean: true or false
  • Integer: Whole numbers
  • Real: Floating-point numbers
  • String: Text data (literal or hexadecimal)
  • Name: Unique atomic symbols (e.g., /Type, /Pages)
  • Array: Ordered collections of objects
  • Dictionary: Key-value mappings where keys are names
  • Stream: Dictionary + binary data
  • Reference: Indirect reference to another object

§Example

use oxidize_pdf_core::parser::objects::{PdfObject, PdfDictionary, PdfName};

// Create a simple page dictionary
let mut dict = PdfDictionary::new();
dict.insert("Type".to_string(), PdfObject::Name(PdfName::new("Page".to_string())));
dict.insert("MediaBox".to_string(), PdfObject::Array(PdfArray::new()));

// Check dictionary type
assert_eq!(dict.get_type(), Some("Page"));

Structs§

PdfArray
PDF Array object - Ordered collection of PDF objects.
PdfDictionary
PDF Dictionary object - Key-value mapping with name keys.
PdfName
PDF Name object - Unique atomic symbols in PDF.
PdfStream
PDF Stream object - Dictionary with associated binary data.
PdfString
PDF String object - Text data in PDF files.

Enums§

PdfObject
PDF Object types - The fundamental data types in PDF.