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
//! Production-grade PDF redaction library with secure text removal.
//!
//! This library provides secure PDF redaction with support for complex
//! text encodings including Type3 fonts. It uses MuPDF's redaction API
//! to physically remove sensitive information from PDF documents.
//!
//! # Features
//!
//! - **Secure Redaction**: Physically removes text from PDFs (not just visual overlay)
//! - **Type3 Font Support**: Handles complex PDF encodings via MuPDF
//! - **Phone Number Detection**: Automatic NANP phone number redaction
//! - **Verizon Account Numbers**: Specialized detection for 9-5 format accounts
//! - **Pattern Matching**: Literal strings and regex patterns
//!
//! # Architecture
//!
//! - [`domain`]: Business logic for pattern matching (phone numbers, accounts)
//! - [`redaction`]: Redaction strategies and service layer
//! - [`error`]: Comprehensive error handling
//!
//! # Quick Start
//!
//! ```no_run
//! use redactor::{RedactionService, RedactionTarget};
//! use std::path::Path;
//!
//! # fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let service = RedactionService::with_secure_strategy();
//!
//! service.redact(
//! Path::new("input.pdf"),
//! Path::new("output.pdf"),
//! &[RedactionTarget::PhoneNumbers]
//! )?;
//! # Ok(())
//! # }
//! ```
//!
//! # Examples
//!
//! ## Redact Verizon Account Numbers
//!
//! ```no_run
//! use redactor::{RedactionService, RedactionTarget};
//! use std::path::Path;
//!
//! # fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let service = RedactionService::with_secure_strategy();
//!
//! service.redact(
//! Path::new("bill.pdf"),
//! Path::new("redacted.pdf"),
//! &[RedactionTarget::VerizonAccount]
//! )?;
//! # Ok(())
//! # }
//! ```
//!
//! ## Pattern Matching
//!
//! ```
//! use redactor::domain::{PhoneNumberMatcher, PatternMatcher};
//!
//! let matcher = PhoneNumberMatcher::new();
//! let text = "Call (555) 234-5678 or 555-987-6543";
//! let phones = matcher.extract_all(text);
//! assert_eq!(phones.len(), 2);
//! ```
// Public API
// Re-exports for convenient access
pub use ;
pub use ;
pub use ;
// Re-export as a module for test backwards compatibility