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

Select area and delete all objects

Community Beginner ,
Jan 05, 2017 Jan 05, 2017

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

TOPICS
Edit and convert PDFs

Views

1.3K

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

correct answers 1 Correct answer

Community Beginner , Jan 06, 2017 Jan 06, 2017

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..." });

Votes

Translate

Translate
Community Expert ,
Jan 05, 2017 Jan 05, 2017

Copy link to clipboard

Copied

Yes. You can create a Redaction annotation over that area and then apply it.

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 Beginner ,
Jan 06, 2017 Jan 06, 2017

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?

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 Beginner ,
Jan 06, 2017 Jan 06, 2017

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..." });

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 06, 2017 Jan 06, 2017

Copy link to clipboard

Copied

LATEST

As you've found out, Redaction annotations are defined using quads, not a rect...

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