The critical difference between cover-up and true redaction is at the content stream level. A standard PDF page has a content stream — a sequence of instructions that tell a renderer what to draw. Text instructions include the character codes, positions, and font references. When LuraPDF processes a redaction, it parses the content stream for each page, identifies the content instructions whose rendered output falls within the redaction box coordinates, removes those instructions from the stream, and writes a filled black rectangle in their place. The result is a content stream where the sensitive data instructions have been deleted, replaced by a solid fill. There are no invisible text characters under the rectangle — the rectangle is all that is in that region of the stream.
For image-based redaction, the pixel data within the redaction region of embedded raster images is overwritten with black pixels before the image stream is re-encoded into the PDF. For metadata, pdf-lib clears the document information dictionary fields — Title, Author, Subject, Creator, Producer — and removes the XMP metadata stream that modern PDF creators embed. Pattern redaction uses text extraction to find all matching strings across pages, calculates their bounding boxes from the text position data, and automatically adds those bounding boxes to the redaction queue before processing. Everything runs in your browser's JavaScript engine. The File API delivers the input PDF to memory, the redaction logic modifies content streams in place, and the Blob download API delivers the sanitized output to your device — no network request carries any part of your document.