Get Quads and extract OverlayText from imported XFDF annotations

Product: Python Apryse SDK

Product Version: 10.7.0

I have Redaction Annotations created from client-side WebViewer and stored in XFDF strings. I’m trying to apply those redactions and burn those at server-side using the SDK and there’re two issues I’m encountering.

  1. for annotations that span accross multiple lines, I need to get its Quads to apply the redaction accurately on those lines but I could only get the rect via GetRect so I can’t accurately apply those redactions. It’s always just a rectangular box so it will also block text that I didn’t redact.
doc = PDFDoc(pdf_path)
xfdf_string = base64.b64decode(payload).decode("utf-8")


view = PDFView()

vec = VectorRedaction()
for page in range(view.GetPageCount() + 1):
    annots = view.GetAnnotationsOnPage(page)

    for ann in annots:
        vec.append(Redaction(page, ann.GetRect(), False, "NEED_OVERLAY_TEXT_HERE"))

This is what I have. Essentially, where I call ann.GetRect(), I want to loop through the Quads of the annotation and add Rect for each of those Quads

  1. I also have OverlayText data in Annotation when it is exported from the WebViewer, but I couldn’t extract it with the SDK. I tried using GetCustomData on the Annot but it didn’t work.

Hi Kaung,

To investigate further could you please provide the following information.

  1. Input file(s) (specifically the PDF and XFDF you are working with)
  2. Generated output file(s)
  3. Screenshots showing the output, and clearly indicating what you expected to get instead, and also clearly indicating the application/browser being used to view.