Skip to main content

otf_pdf_syntax/
lib.rs

1//! PDF syntax layer: byte sources, the file header, the lexer and object
2//! parser, the cross-reference table, stream filters, decryption and repair.
3//!
4//! Every input is untrusted (docs/PLAN.md ยง2): nothing here panics on any
5//! bytes, every resource is bounded by [`Limits`], and all reads go through
6//! the injected [`Source`] trait rather than touching the filesystem.
7#![forbid(unsafe_code)]
8
9pub mod crypt;
10mod diag;
11mod error;
12mod file;
13pub mod filters;
14mod header;
15pub mod lexer;
16mod limits;
17mod object;
18pub mod parser;
19pub mod serialize;
20mod sink;
21mod source;
22pub mod xref;
23
24pub use crypt::{Entropy, Permissions};
25pub use diag::{Diagnostic, DiagnosticKind, Diagnostics};
26pub use error::{Error, Result};
27pub use file::{File, OpenOptions, SharedSource};
28pub use header::{HEADER_SEARCH_WINDOW, Header, HeaderError, Version, find_header};
29pub use limits::{Budget, LimitKind, Limits, Strictness};
30pub use object::{Dict, Name, ObjId, Object, PdfString, Stream};
31pub use sink::Sink;
32pub use source::{Source, SourceError};