Solutions · Document Intelligence · PDF redaction

Content out. Not just covered.

A black box over a name still ships it. PdfRedactor deletes the text, pixels and vectors underneath, then re-reads the output to prove it.

Terms, regex, areas Verified before written Hidden data stripped 100% local

PdfRedactor

Static one-call API. File, stream, byte-array, or attachment input. Sync and async.

Glyph-level removal

Text outside a mark keeps its exact position. Only the glyphs under the region are deleted, then the object is rebuilt.

Deleted, not hidden

The underlying data is erased. Removed content cannot be recovered by text extraction, raw stream inspection, or rendering.

Every content type under the mark.

One pass removes text, pixels, vectors, and annotations under each region, and descends into reused resources. Shared forms and images are cloned before editing, so only the targeted instance changes.

Text

Glyph granularity

Glyphs under the region are deleted from the content stream and the text object is rebuilt with its remaining glyphs in place. Neighbouring text never shifts.

Images

Pixels scrubbed

Image pixels intersecting a region are scrubbed and the image is re-encoded. An image that cannot be decoded is removed entirely, so redacted pixel data never survives.

Vectors

Paths trimmed

Vector path content intersecting a region is removed or trimmed, so charts, rules, and fills under the mark disappear with the text.

Annotations

Markup deleted

Annotations whose rectangle intersects a region are deleted. Their markup contents, link targets, and form field values often duplicate the redacted content.

Forms

Into Form XObjects

Redaction descends into Form XObjects. The affected instance is cloned before editing, so the same form referenced from other pages keeps its original content.

Marking

Three ways to mark

Mark by SearchTerms (plain or regular expressions), explicit PdfRedactionArea regions, or the file's /Redact annotations. Combine all three.

Primitives

Areas are IBounds

A redaction area takes any IBounds: a Rectangle, a layout TextElement, or a search match's bounds. Fill colour is a Color32, alpha included.

Encryption

Encrypted sources

Pass the password and the engine opens protected sources. The redacted output is always written unencrypted.

Report

Full accounting

Every redaction returns a report: pages processed, search matches, glyphs and text objects removed, images and paths edited, forms cloned, annotations deleted.

Four working pipelines.

Every occurrence of each term is found and permanently removed, and a report says what changed.

RedactByTerm.cs
using LMKit.Document.Pdf;

var request = new PdfRedactionRequest();
request.SearchTerms.Add("John Doe");
request.SearchTerms.Add("4111 1111 1111 1111");

var report = PdfRedactor.RedactToFile("contract.pdf", "contract_redacted.pdf", request);

Console.WriteLine($"Matches: {report.SearchMatches}, glyphs removed: {report.RemovedGlyphs}");

Erased, and proven gone.

Nothing under a mark survives extraction, stream inspection or rendering, and everything outside it stays exactly where it was.

Verified
On by default: the output is re-read under every area, OCR text included; residual text throws PdfRedactionVerificationException and nothing is written
Sanitized
Sanitize strips metadata, attachments, JavaScript, bookmarks, PieceInfo, XFA, thumbnails and structure-tree text
Labeled
An area's label is drawn inside its box as vector outlines, so it adds no extractable text
Pattern matched
Search terms as .NET regular expressions, with a match timeout
Signature-safe
A signed PDF is refused unless AllowSignatureInvalidation consents to breaking its signatures
Reported
Matches, glyphs, images, paths, annotations, sanitized items and labels, counted per call

Redaction plus the toolkit.

PDF toolkit

Merge, split, render, search-highlight, unlock, and inspect PDFs with the same library.

PDF toolkit page

Find what to redact

Locate names, IDs, and card numbers first with document search, then feed the matches straight into redaction areas.

Document search page

PDF/A conversion

PdfAConverter turns existing PDFs into archival PDF/A-1b / 2b / 3b: fonts embedded, colours calibrated, prohibited constructs removed.

PDF/A conversion page

Smart redaction

Let an on-device model find the PII for you, review it with a human in the loop, then remove it with this engine. Detection plus removal in one workflow.

Smart redaction page

Build it. Read it. Try it.

Working console demos on GitHub, step-by-step how-to guides on the docs site, and the API reference for the classes used on this page.

Redacted for real. No cloud.

Free Download Download