1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
//! # PDFluent — Pure-Rust PDF SDK
//!
//! `pdfluent` is the public API for the PDFluent SDK. It provides a single,
//! coherent entry point for PDF manipulation: loading, editing, rendering,
//! merging, signing, encryption, redaction, PDF/A compliance, and more.
//!
//! ## Quick start
//!
//! ```no_run
//! use pdfluent::prelude::*;
//!
//! fn main() -> Result<()> {
//! let mut doc = PdfDocument::open("invoice.pdf")?;
//! doc.metadata_mut()
//! .set_title("Processed Invoice")
//! .commit()?;
//! {
//! let mut form = doc.form_mut();
//! form.set_text("invoice_number", "INV-2026-0042")?
//! .set_checkbox("paid", true)?;
//! }
//! doc.compress(CompressOptions::strict())?;
//! doc.save("invoice-processed.pdf")?;
//! Ok(())
//! }
//! ```
//!
//! ## Licensing
//!
//! There is no licence key, no tier and no activation call. PDFluent is
//! published under the AGPLv3 with a commercial licence as the alternative,
//! and a commercial licensee's rights come from a signed order form rather
//! than from a check in the binary. Nothing here reads a key, refuses a
//! capability or marks output. See `docs/licensing.md`.
//!
//! ## Design foundation
//!
//! The public API is frozen per RFC 0001 (see `docs/rfc/0001-sdk-core-api.md`).
//! Breaking changes require a new RFC.
// Copyright (c) 2026 Innovation Trigger B.V.
//
// PDFluent is available under two licences, at your option: the GNU AGPLv3, or
// the PDFluent Commercial Licence. See the LICENSE file in this repository --
// that file travels with the copy you received, which a URL does not.
/// Image placements already on a page: list, move or resize, replace, remove.
/// See [`PdfDocument::image_placements`].
pub use image_edit;
/// Async I/O wrappers via Tokio's blocking pool.
/// Layout-aware text replacement engine (find & replace by match id).
pub use text_edit;
/// Embedding a caller-supplied Unicode font, so a replacement can contain
/// scripts the document itself never had. See
/// [`text_edit::FontFallback::EmbedUnicode`].
pub use unicode_font;
/// PDF/A profiles and validation reports — an alias for [`compliance`].
///
/// `pdfa` is the name our own documentation uses and the better one for what
/// this holds; `compliance` stays because it is what the module has been called
/// since 1.0 and removing it would break every caller. See
/// `docs/API_CONTRACT.md`.
///
/// The verb lives on the document: [`document::PdfDocument::validate_pdfa`] and
/// [`document::PdfDocument::convert_to_pdfa`]. This module holds the nouns.
/// Optical character recognition.
///
/// The trait and the backends live in `pdf-engine`, which the facade already
/// depends on; this is the name they were missing here.
///
/// **The facade wires up no backend.** That is deliberate (decision of
/// 19-08-2026): a plain `pdfluent` dependency must not drag in system libraries
/// or download models. Bring your own [`ocr::OcrBackend`], or enable one of
/// `pdf-engine`'s features and use the backend it exposes.
/// Annotation types.
///
/// [`document::PdfDocument::annotations`] already returned these; they had no
/// name in the facade, so an example could not spell out what it got back.
// ---------------------------------------------------------------------------
// Top-level re-exports (public API surface)
// ---------------------------------------------------------------------------
pub use crate;
pub use cratePageDecoration;
pub use crate;
pub use crate;
pub use crate;
pub use crate;
pub use crate;
pub use crate;
pub use crate;
pub use crate;
pub use crate;
pub use crateRedactOptions;
pub use crate;
pub use crate;
pub use crate;
/// Re-export of [`pdf_engine::join_page_texts`]: the form-feed convention every
/// PDF text reader emits, for callers that hold the pages from
/// [`PdfDocument::extract_text_pages`] and want the flat form of them.
pub use join_page_texts;
/// The model tiers' shared surface, re-exported from `pdf-engine`: the model
/// specs, the failure types and the install paths (#641).
///
/// One definition and not a facade copy, for the reason the block model is
/// re-exported rather than mirrored: a caller matching a [`model::ModelError`]
/// from the facade and one from the engine must be matching the same type.
pub use model;
/// Rasterization precision/speed trade-off for render paths, re-exported
/// from the engine (one definition, not a facade copy, so callers holding
/// a value from either crate hold the same type).
pub use RasterQuality;
/// Re-export of [`pdf_engine::ProcessingLimits`] for use with
/// [`OpenOptions::with_processing_limits`].
pub use ProcessingLimits;
/// The TATR test seam, hidden as in the engine: the CLI's own wiring test
/// names it to prove the flag maps to the options the library output tests
/// run with, and no caller does.
pub use TatrTestHook;
/// The block model and both serialisations of it, re-exported from
/// `pdf-engine`: what [`PdfDocument::extract_blocks`] hands back, which pages
/// it hands back, and the two ways to write them out (#573).
///
/// One definition and not a facade copy of it, for the reason
/// [`ProcessingLimits`] is re-exported rather than mirrored: a caller holding
/// a `Block` from the facade and one from the engine must be holding the same
/// type, or every consumer of both has to convert between two shapes that
/// carry identical fields.
pub use ;
/// The SDK version at compile time. Bindings check this at runtime to ensure
/// compatibility with the loaded `pdfluent` dynamic library.
pub const