• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Specific Area Redaction Automation

New Here ,
Jan 14, 2025 Jan 14, 2025

Copy link to clipboard

Copied

Hello, I've recently picked up a task involving a list of company names.

 

I need to use the redact tool to remove information from this list so that the entries for only one company are visible. I then need to repeat this process for each company.

 

I've tried using the JavaScript function but can't seem to get that to work, specifically with difficulty in labelling variables.

 

I looked in forums for similar posts but these seem to refer to processes which repeat redactions of the same area.

 

Thank you for any help.

TOPICS
Edit and convert PDFs , How to , JavaScript , PDF

Views

245

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 14, 2025 Jan 14, 2025

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 14, 2025 Jan 14, 2025

Copy link to clipboard

Copied

How is the information identified?  It is simple to automate redaction if it's in the same location on every document, or it has a unique pattern that can be identified with text matching.  

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 14, 2025 Jan 14, 2025

Copy link to clipboard

Copied

The poster said "which repeat redactions of the same area" so I linked to your article.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 14, 2025 Jan 14, 2025

Copy link to clipboard

Copied

Thank You!  However, I think that quote was about how other post didn't work because they were about area location. 

 

But regardless. Clear, explicit info is needed to provide good advice. 

 

And on that topic, the poster stated they were having trouble with JavaScript.  So it would be helpful to see the script they are using. 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 14, 2025 Jan 14, 2025

Copy link to clipboard

Copied

Man, that is a good article, if I do say so myself.  It says it's for Acrobat 9 in the title, but everything in it is still bang on for Acrobat DC. 

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 14, 2025 Jan 14, 2025

Copy link to clipboard

Copied

Especially the rect to quads conversion.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 15, 2025 Jan 15, 2025

Copy link to clipboard

Copied

The information is in a list containing entries for all companies and I need to redact the same original list multiple times to generate a redacted document for each unique company. (In the end I should have a redacted document for each company with all other companies' entries redacted)

 

I've quickly searched for text matching in the community but couldn't find anything specifically related to what I need. Could you kindly advise how I could look further into this?

 

Thank you for your help and time

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 15, 2025 Jan 15, 2025

Copy link to clipboard

Copied

You can use Search and Remove Text in the Action Wizard under the Protection category.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 15, 2025 Jan 15, 2025

Copy link to clipboard

Copied

You need to tell us how the text that is to be redacted can be identified. 

for example:

1)  does the text appear in exactly the same page location in each document?

2) Can the text be identified from a search?  You say these are company names. Would redacting every instance of a company name work?  

 

In order to automate this process with a script we need to know the details. 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 16, 2025 Jan 16, 2025

Copy link to clipboard

Copied

Thanks for your help. 

 

For clarity I've made a mockup. The first doc is an example of the original document. Typically the actual documents will be multiple pages, but for simplicity's sake I have made it one page.

 

The second file is a version of the file redacted for "Driver's international"- one of the companies. This is the output I need, and I need one document like this for each company in the list.

 

To answer your questions: 

1) No, the information is reliant on how many entires for each company there are, meaning they may move and change.

2) The names can be searched, but in actual practise there are a large number of companies, so a master list would likely have to be used to loop the command, excluding one company each time.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 16, 2025 Jan 16, 2025

Copy link to clipboard

Copied

If all the pages are laid out the same, and the companies are in a consecutive list, you could highlight the words with an Action available here, then use the top rect coordinate of the first highlight as the bottom rect of the top area (left, right and top would be constant) and use the bottom rect of last highlight as the top rect of the bottom area (left, right, and bottom would be constant).  If you're interested in hiring me to program this for you, you can message me privately.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 16, 2025 Jan 16, 2025

Copy link to clipboard

Copied

LATEST

Your idea of a master list is spot on.  The way to this would be to have all the company names in a CSV file.  

An Acrobat automation script could be written to read the file and double loop through all the names, redacting the entire line for each name except for 1.   

 

This is not a trivial piece of scripting. You should consider hiring a developer.  PM me if you are interested. 

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines