Skip to main content

redact_pdf

Function redact_pdf 

Source
pub fn redact_pdf(
    pdf_bytes: &[u8],
    regions: &[RedactionRegion],
) -> Result<Vec<u8>, FormeError>
Expand description

Redact regions of a PDF by overlaying opaque rectangles.

Takes arbitrary PDF bytes and a list of redaction regions (page, x, y, width, height in top-origin coordinates). Returns new PDF bytes with the redaction rectangles drawn on top via incremental update.