10 Replies Latest reply on Dec 11, 2015 11:36 AM by try67

    How to redact a region with text to white?

    andyl17361417

      I work out the following JavaScript code to redact the left header of PDF docs, but after running the code, the region redacted is in black, how can I redact the region with white rectagles? Thanks a lot!

       

      for(var pg = 0; pg < this.numPages; pg++)
      {
        var rCrop = this.getPageBox("Crop",pg);
        this.addAnnot({
        type:"Redact", page:pg,
        quads:[[0, rCrop[1], rCrop[2] - 345, rCrop[1], 0, rCrop[1] - 14, rCrop[2] - 345, rCrop[1] - 14]],
        overlayText: "",
        alignment: 1,
        repeat:true });
      }
      this.applyRedactions({bKeepMarks: false, bShowConfirmation: false, cProgText: "Processing..." });