Skip to main content
Participant
February 29, 2016
Question

Redact using quads

  • February 29, 2016
  • 1 reply
  • 1862 views

If you have your redactions already marked is there a way to loop through and gather the coordinates while applying another process using Acrobat Pro 9.5?  I was looking at this,  https://acrobatusers.com/tutorials/auto_redaction_with_javascript , and other examples but they all seem to be static numbers for the quads.  I'd just like to apply a strikethrough on the redactions I have marked and if possible place a stamp based of the quads coordinates.

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
February 29, 2016

You can simply convert them from Redact annotations to StrikeOut ones by changing their type property. Adding a stamp next to them is also possible, but more complex to implement.

Participant
March 17, 2016

Am I headed the right direction?

syncAnnotScan();

annots = getAnnots();

if (annots)

for (var i = 0; i < annots.length; i += 1) {

var rec = getAnnots(this.pageNum)[0].rect;

var left = rec[0];

var right = rec[2];

var top = rec[3];

var bot = rec[1];

        qd = [[left, top, right, top, left, bot, right, bot]];

if (annots.type === "Redact") {

  annot = this.addAnnot({

     type: "StrikeOut",

     strokeColor: color.red,

     quads:qd;

     }

   }

break;

}

Inspiring
March 18, 2016

This should be sufficient:

syncAnnotScan();

annots = getAnnots();

if (annots) {

    for (var i = 0; i < annots.length; i += 1) {

        if (annots.type === "Redact") {

            annots.type = "StrikeOut";

        }

    }

}