pub struct RebuildOptions {
pub remove_unreferenced: bool,
pub merge_duplicates: bool,
pub object_streams: bool,
pub level: u8,
pub linearize: bool,
}Expand description
What rebuild does beyond renumbering.
Fields§
§remove_unreferenced: boolDrop every object not reachable from the trailer’s /Root or /Info.
merge_duplicates: boolMerge objects that are identical after their own references are merged: streams (except page content streams), fonts, font descriptors, encodings, graphics states, non-empty arrays and plain values. Pages, annotations, fields, layers and structure elements keep their identity even when identical.
object_streams: boolPack every non-stream object into Flate-compressed object streams and write a cross-reference stream. Raises the header to PDF 1.5 when it is lower (§7.5.7 is a PDF 1.5 feature).
level: u8Flate level (0–9) for object streams and the cross-reference stream.
linearize: boolWrite a linearized file (“Fast Web View”, Annex F) instead: page 1
first, then a hint stream locating every page. Object streams are
not packed when this is on, the header is raised to PDF 1.2 when
lower, and inheritable page attributes move onto every page. Off in
Self::all: it adds bytes rather than saving them.
Implementations§
Source§impl RebuildOptions
impl RebuildOptions
Sourcepub const fn none() -> Self
pub const fn none() -> Self
Everything off: a caller holding this keeps the file’s structure and
does not call rebuild at all (see Self::is_none).