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
//! License tiers and the tier → capability mapping.
//!
//! Tiers match the pricing page on <https://pdfluent.com/pricing>.
use crate::capability::{Capability, CapabilitySet};
/// Commercial tier level.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[non_exhaustive]
pub enum Tier {
/// Free evaluation with minimum evaluation surface; output is marked via
/// `/Producer` metadata.
Trial,
/// €499/yr — single developer.
Developer,
/// €1,499/yr — up to 5 developers, adds PDF/A, signatures, redaction,
/// PDF/UA, e-invoicing, Python/Node bindings.
Team,
/// €2,999/yr — up to 15 developers, adds XFA flatten, OCR, DOCX/XLSX/PPTX
/// export, Java bindings, Docker image.
Business,
/// €5,999/yr — unlimited, adds OEM/SaaS redistribution, air-gapped,
/// 24h support, dedicated Slack.
Enterprise,
}
impl Tier {
/// Whether this tier marks output via `/Producer` metadata.
pub const fn is_marked(self) -> bool {
matches!(self, Tier::Trial)
}
/// Canonical set of capabilities granted by this tier.
///
/// Each tier is a strict superset of the tier below it. Trial grants
/// the minimum surface needed to evaluate the SDK; full capabilities
/// unlock progressively from Developer through Enterprise.
///
/// Snapshot-tested in `tests/tier_matrix.rs`.
pub fn capabilities(self) -> CapabilitySet {
use Capability::*;
let trial = CapabilitySet::empty()
.with(PdfParse)
.with(PdfWrite)
.with(PageOps)
.with(TextExtract)
.with(AcroFormRead)
.with(PdfaValidate);
match self {
Tier::Trial => trial,
Tier::Developer => trial
.with(TextExtractWithLayout)
.with(ImageExtract)
.with(AcroFormFill)
.with(AcroFormFlatten)
.with(PdfaConvertA2b)
.with(Redaction)
.with(XfaParse)
.with(XfaFill)
.with(EncryptionRead),
Tier::Team => Tier::Developer
.capabilities()
.with(DigitalSignatureSign)
.with(DigitalSignatureVerify)
.with(XfaFlatten)
.with(WasmRuntime)
.with(RenderRaster)
.with(RenderThumbnail)
.with(EncryptionWrite)
.with(PdfuaValidate)
.with(PdfuaConvert)
.with(EInvoiceZugferd)
.with(EInvoiceFacturX)
.with(EInvoiceXRechnung),
Tier::Business => Tier::Team
.capabilities()
.with(PadesLongTerm)
.with(PadesLongTermArchive)
.with(PdfaConvertA1b)
.with(PdfaConvertA3b)
.with(OcrTesseract)
.with(TableExtract)
.with(PdfDiff)
.with(DocxExport)
.with(XlsxExport)
.with(PptxExport)
.with(Html2Pdf),
Tier::Enterprise => Tier::Business
.capabilities()
.with(OcrPaddle)
.with(AirGapped)
.with(OemRedistribution),
}
}
}