Copy link to clipboard
Copied
Hi,
I am trying to create an automatic process for applying redaction based on absolute positions in my pdf documents. I am doing this by following these steps :
1. Get the coordinates for the area needed to be redacted
2. Pass those coordinates in a variable and using a for loop mark the subsequent pages for redaction.
3. Saving them to a local folder
However, i am facing a small issue here. I have 2 redaction marks in my document - 1 on the first page only, the other on all the subsequent pages. When I apply the second redaction it seems like its being applied only on the subsequent pages but when the process completes, I see the second redaction on page 1 as well.
Any idea as to why this could be happening. I checked my for loop in the javascript and it seems to be logically correct. Following is the for loop I am using for marking the second redaction.
for(var pg=1; pg<this.numPages; pg++)
{
this.addAnnot({
type:"Redact",
page: pg,
quads: qda
});
}
Any help would greatly be appreciated.
Thanks in Advance !
Copy link to clipboard
Copied
Did you use the same quads for the first redaction?
Copy link to clipboard
Copied
Why don't try to redact your document using it in Acrobat Pro DC without using script.
You can redact in accordance to your desire pages. See the images what i am doing for redaction
1. Go to Tools and choose "Redact"
2. Click on Mark for Redaction and from the drop down menu choose "Pages"
3. Now you can put your desirable pages, for ranges use "-" (hyphen) and for separate pages use "," (comma)
Thanks
Copy link to clipboard
Copied
Can you post the full code?