pdfboss_write/lib.rs
1//! PDF creation for pdfboss: the write-side twin of `pdfboss-core`.
2//!
3//! Three altitudes, each complete on its own and lowering into the one
4//! beneath:
5//!
6//! - **document** — [`Pdf`] and [`Page`]: plain structs whose fields are
7//! the composition, saved with [`Pdf::save`].
8//! - **canvas** — [`Canvas`]: an imperative painter accumulating
9//! `pdfboss_core::content::Op`, the same IR the reader parses, so every
10//! generated content stream round-trips through `parse_content`.
11//! - **cos** — [`Writer`]: numbered objects in, finished file bytes out,
12//! with stream compression, object streams, both cross-reference styles
13//! and a deterministic `/ID`.
14//!
15//! Determinism is a feature: the same input produces byte-identical
16//! output. The crate never reads clocks or randomness — dates appear only
17//! when callers supply them.
18
19pub mod canvas;
20pub mod color;
21pub mod content;
22pub mod error;
23pub mod font;
24pub mod image;
25pub mod pdf;
26pub mod ser;
27pub mod sink;
28pub mod writer;
29
30pub use canvas::{Canvas, CanvasParts, ImageHandle, LineCap, LineJoin};
31pub use color::Color;
32pub use content::serialize_ops;
33pub use error::{Error, Result};
34pub use font::Standard14;
35pub use image::ImageData;
36pub use pdf::{Date, Metadata, Page, PageSize, Pdf};
37pub use sink::{AsyncByteSink, Immediate};
38pub use writer::{WriteOptions, Writer, XrefStyle};