Redact Address in PDF that spans multiple lines

@alexey.noskov

In a PDF document, I need to redact an address that spans multiple lines (e.g., in a table cell):

500 Dungeon Loop Blvd., Suite 1200, San Serifo, TX  
75001

Using RedactionAnnotation, can I redact such multi-line content as a single redacted block, even though it’s rendered as two lines in the document?

If not directly, what’s the recommended approach for handling this kind of redaction with Aspose.PDF for .NET?

@ashiqshanavas

If possible, could you please share your sample PDF document with us? We will use Aspose.PDF to test the scenario in our environment and address it accordingly.

@asad.ali

test redact 4.pdf (45.4 KB)

For example if we try to redact below line it was not getting redacted as India was on next line

12 Green Meadows Apartment, Banjara Hills, Hyderabad, Telangana 500034,India

We’re using Aspose.PDF for .NET to redact sensitive text in PDF files. The general flow:

  1. Search Text:
    We use TextFragmentAbsorber with optional regex to locate matches, including case sensitivity and whole-word options.
  2. Get Coordinates:
    For each TextFragment match, we extract its Rectangle (bounding box).
  3. Redact:
    We create a RedactionAnnotation using that rectangle, add it to the page, and call .Redact() to apply the blackout.

This works fine for single-line text, but in some cases (like addresses in tables), the content appears across multiple lines/fragments. We want to redact that as a single block.

@ashiqshanavas

We are checking it and will get back to you shortly.

@ashiqshanavas

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PDFNET-61378

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.