How to save overlay text of redaction annotation when redacting the document?

Product: PDFNet

Product Version: 9.3.0

Please give a brief summary of your issue:
I need to be able to save any overlay text added to the redaction area with the specific selected style (appearance). I’m using

redact(Doc doc, Redaction[] red_arr, Redactor.Appearance app, boolean ext_neg_mode, boolean page_coord_sys)

However, the Redactor.Redaction class does not contain all needed properties for this annotation. I can see that there is the com.pdftron.pdf.annots.Redaction.java with all the data I need but how can I redact this annotation?

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:Forums:

Hello,

Thank you for contacting us about this. Just to clarify, are you looking to apply redaction annotations and the text styles? Specifically, which styling information is missing? in the Redactor.Appearance class?

If you could provide an example file, that would be most helpful with this case.

Hi,
I want to apply the redaction with overlay text and it’s style (font and text alignment). Bellow is a snippet of my code.

        Annot annot = page.getAnnot(i);
        if (annot.getType() == Annot.e_Redact) {

            Redaction redaction = new Redaction(annot);
            appearance.horizTextAlignment = redaction.getQuadForm();
            appearance.font = new Font(redaction.getSDFObj());
        }

redaction.getQuadForm() results with exception:

 Message: GetName() can't be invoked on Obj of this type.
new Font(redaction.getSDFObj());

results with:

  Message: Non-standard font is missing 'Widths' array
  Conditional expression: m_base14_type != Font::e_null

Can you provide me an example how can I get these correctly and set it to the Redactor.Appearance?

Thanks.

Any info on this topic? Thanks.