Files
craft-libs/crates/pdf/src/lib.rs
T
Dylan M. Taylor 97f4971666 craft-pdf: the PDF filter chain from PdfCraft (filters), on craft-stream-codecs (#1033)
* Add craft-stream-codecs: the codec modules of PdfCraft's stream filters

LZW, ASCII85, ASCIIHex, RunLength, the TIFF and PNG predictors, bounded CCITT
fax decoding (through hayro-ccitt) with Group 4 encoding (through fax), and
the lossless JBIG2 encoder with its MQ coder, from pdfcraft-filters at
PdfCraft revision 80e26e674d1aa33078e83c8139875047f3289eb6.

The crate sits below craft-pdf and craft-tiff: it knows no container. The
PDF filter chain, Flate and the bounded JBIG2 decoding entry are not part of
it.

* craft-pdf: the PDF filter chain from PdfCraft (`filters`)

Adds the `filters` feature: the /Filter chain of pdfcraft-filters (PdfCraft
revision 80e26e674d1aa33078e83c8139875047f3289eb6) as craft_pdf::filters,
over the codecs in craft-stream-codecs. It adds Flate, strict and tolerant
chain decoding, byte accounting and a shared work allowance, and encoding,
with the chain's unit tests, its property tests and its fuzz target.

The code is unchanged apart from the imports of the moved codecs; FilterError
is craft-stream-codecs' CodecError under its old name.
2026-11-11 20:48:55 -05:00

26 lines
800 B
Rust

//! Shared optional PDF reading, rendering and writing for Craft applications.
//!
//! Applications retain document models, layout, shaping, font policy and scheduling.
//! Advanced backend re-exports are coupled to the pinned backend, not a universal document model.
#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)]
#[cfg(feature = "crypt")]
pub mod crypt;
#[cfg(feature = "filters")]
pub mod filters;
#[cfg(feature = "interpret")]
pub use hayro_interpret as interpret;
mod link;
#[cfg(feature = "read")]
pub use hayro_syntax as syntax;
pub use link::safe_url;
#[cfg(feature = "read")]
mod read;
#[cfg(feature = "read")]
pub use read::*;
#[cfg(feature = "raster")]
pub mod raster;
#[cfg(feature = "write")]
pub mod write;