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

redaction Using Javascript

Guest
Jul 14, 2016 Jul 14, 2016

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 !

TOPICS
Acrobat SDK and JavaScript

Views

1.2K
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 ,
Jul 15, 2016 Jul 15, 2016

Copy link to clipboard

Copied

Did you use the same quads for the first redaction?

Votes

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
Enthusiast ,
Jul 15, 2016 Jul 15, 2016

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"

1.gif

2. Click on Mark for Redaction and from the drop down menu choose "Pages"

2.gif

3. Now you can put your desirable pages, for ranges use "-" (hyphen) and for separate pages use "," (comma)

3.gif

Thanks

Votes

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 ,
Jul 15, 2016 Jul 15, 2016

Copy link to clipboard

Copied

LATEST

Can you post the full code?

Votes

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