Skip to main content
Participating Frequently
September 18, 2024
Answered

How to redact same areas on multiple documents

  • September 18, 2024
  • 1 reply
  • 2381 views

I have thousands of documents where I'm trying to redact information that's located in the same position. I can't redact based on searching for text because it's different information on each document. Is there a quick way to do this?

This topic has been closed for replies.
Correct answer PDF Automation Station

I see what you mean, gonna see if that fixes anything


I fixed and tested.  It worked.  If you are going to use this in an Action on several docs at once you should set bShowConfirmation to false so you don't have to dismiss a popup message for each doc.

1 reply

PDF Automation Station
Community Expert
Community Expert
September 18, 2024

First you will need to get the quads of the area you want to redact.  You can do this by using the highlight text commenting tool, selecting the highlight, and running the following script in the console:

this.selectedAnnots[0].quads;

Next, create an Action that Executes a JavaScript.  The script is:

this.addAnnot({
type:"Redact",
page: pg,
quads: qd});
this.applyRedactions();

pg is a variable representing the zero-based page number to apply the redactions to, and qd is a variable representing the quads returned from the previous step.

zg87878Author
Participating Frequently
September 18, 2024

Yeah, I was able to get the information for all of my quads and have that saved. 

 

I was able to plug one of them into this Javascript:

this.addAnnot({
type:"Redact",
page: 0,
quads: [[144.00064086914062, 750.10888671875, 179.34625244140625, 750.10888671875, 144.00064086914062, 732.4360961914062, 179.34625244140625, 732.4360961914062]],
overlayText: ":It's gone:",
alignment: 1, // Center alignment
repeat:true
});

 

But beyond that I can't get it to work when I try plugging quads into the full code that I got from the tutorial I'm looking at. It's from 2008 so I'm not sure if it's out of date information

PDF Automation Station
Community Expert
Community Expert
September 18, 2024

I see what you mean, gonna see if that fixes anything


I fixed and tested.  It worked.  If you are going to use this in an Action on several docs at once you should set bShowConfirmation to false so you don't have to dismiss a popup message for each doc.