Solutions · Document Intelligence · PDF redaction

Content out. Not just covered.

A black rectangle over a name still ships the name underneath. Real redaction deletes the data. LM-Kit ships PdfRedactor: one call that removes text glyphs from content streams, scrubs and re-encodes image pixels, trims vector graphics, deletes intersecting annotations, and processes content nested inside Form XObjects. What survives keeps its exact position. Fully on-device.

Search / area / annotation marking Unrecoverable removal 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.

What redaction removes

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 (every occurrence redacted), explicit PdfRedactionArea regions, or the file's pre-existing /Redact annotations. Combine all three in one request.

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.

Real redaction code

Three 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}");
The guarantee

Erased, and proven gone.

Redacted content is removed from the content streams, the image data, and the annotation objects, then the affected pages are regenerated. The result carries no recoverable trace of the removed content through text extraction, raw stream inspection, or rendering, while every glyph, image, and path outside the marks stays exactly where it was. The engine is covered by a regression suite that reopens each redacted output and fails if a secret survives or if surrounding content was damaged.

Related capabilities

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

Demos & docs

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.

Get Community Edition Download