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
//! Unified page-decoration surface (Epic 3 #1225).
//!
//! The website promises several decoration APIs that semantically
//! overlap — watermark, header/footer, page numbers, stamp — and each
//! would otherwise grow its own per-type method on `PdfDocument`.
//! `PageDecoration` is the shared entry point.
//!
//! # Shape
//!
//! A [`PageDecoration`] is a non-exhaustive enum tagged by decoration
//! family. The one variant with wired options today is
//! [`PageDecoration::Watermark`]. Additional variants — header/footer,
//! page numbers, stamp — are reserved for 1.1 follow-ups; they are
//! intentionally left out of this enum rather than stubbed with empty
//! option structs so the 1.0 surface honestly reflects what's
//! implementable.
//!
//! # Usage
//!
//! ```no_run
//! # fn main() -> pdfluent::Result<()> {
//! use pdfluent::prelude::*;
//!
//! let mut doc = PdfDocument::open("in.pdf")?;
//!
//! // Single call, builder-friendly:
//! doc.add_decoration(PageDecoration::watermark(
//! "DRAFT",
//! WatermarkOptions::centered().rotated(45.0).opacity(0.3),
//! ))?;
//! # Ok(()) }
//! ```
//!
//! The existing per-family methods (`add_watermark`) are preserved for
//! backwards compatibility with website snippets; they delegate to
//! [`PdfDocument::add_decoration`].
//!
//! [`PdfDocument::add_decoration`]: crate::PdfDocument::add_decoration
use crateWatermarkOptions;
/// A page decoration — the unified input type for
/// [`PdfDocument::add_decoration`].
///
/// [`PdfDocument::add_decoration`]: crate::PdfDocument::add_decoration