Created
September 19, 2023 08:58
-
-
Save conholdate-gists/7c42a1864e2e2c4fc632fad99961a36a to your computer and use it in GitHub Desktop.
Redact PDF Online for Free | PDF Text Image Metadata Redaction Online
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create redactor | |
Redactor redactor = new Redactor("sample.pdf"); | |
// Create exact phrase redaction | |
ExactPhraseRedaction redaction = new ExactPhraseRedaction("John Doe", true, new ReplacementOptions("[personal]")); | |
// Apply redaction | |
RedactorChangeLog result = redactor.Apply(redaction); | |
if (result.Status != RedactionStatus.Failed) | |
{ | |
redactor.Save(); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create redactor | |
final Redactor redactor = new Redactor("sample.pdf"); | |
try | |
{ | |
// Create exact phrase redaction and apply redaction | |
redactor.apply(new ExactPhraseRedaction("John Doe", true /*isCaseSensitive*/, new ReplacementOptions("[personal]"))); | |
redactor.save(); | |
} | |
finally { redactor.close(); } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment