Copy link to clipboard
Copied
Hello,
is possible in Adobe Acrobat Pro XI via javascript select area with coordinates (like with selection tool) and after delete all selected objects (texts, images)?
Thanks
It's working now
for(var pg = 0; pg < this.numPages; pg++){
var rCrop = this.getPageBox("Crop",pg);
this.addAnnot({
type:"Redact",
page:pg,
quads:[[0, 20, rCrop[2], 20, 0, 0, rCrop[2], 0]],
overlayText: "",
alignment: 1,
repeat:true
})
;}
this.applyRedactions({bKeepMarks: false, bShowConfirmation: false, cProgText: "Processing..." });
Copy link to clipboard
Copied
Yes. You can create a Redaction annotation over that area and then apply it.
Copy link to clipboard
Copied
Thanks, I tried following code
this.addAnnot({page: 0,type: "Redact",rect: [[0, 0, 500, 200]]});
But no matter the coordinates, rectangle is always in bottom left corner. Any ideas?
Copy link to clipboard
Copied
It's working now
for(var pg = 0; pg < this.numPages; pg++){
var rCrop = this.getPageBox("Crop",pg);
this.addAnnot({
type:"Redact",
page:pg,
quads:[[0, 20, rCrop[2], 20, 0, 0, rCrop[2], 0]],
overlayText: "",
alignment: 1,
repeat:true
})
;}
this.applyRedactions({bKeepMarks: false, bShowConfirmation: false, cProgText: "Processing..." });
Copy link to clipboard
Copied
As you've found out, Redaction annotations are defined using quads, not a rect...