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

Action Wizard - Delete a Picture (always the same position in every PDF)

Community Beginner ,
Oct 25, 2022 Oct 25, 2022

Greetings,

 

is there a possibility to delete the same picture in every pdf automatised with Action Wizard?

 

We´re trying to create an automatised publication of our "User Manuals".

But the one problem we still have is, that we also need "User Manuals" without the Company Logo on front.

 

So the question is, can we somehow delete the Logo in all User Manuals?(not the whole page, because there is other important information on it)

 

 

Thanks in advance!

TOPICS
Edit and convert PDFs
1.6K
Translate
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
1 ACCEPTED SOLUTION
Community Expert ,
Oct 25, 2022 Oct 25, 2022

Then you can do it using this code as a part of an Action:

 

var q = [[82.07098388671875,294.1651916503906,538.5333251953125,294.1651916503906,82.07098388671875,782.902587890625,538.5333251953125,782.902587890625]];
this.addAnnot({page: 0, type: "Redact", quads: q, fillColor: color.white});
this.applyRedactions();

 

Add a Save command after the Execute JavaScript command to save the edited file, but keep in mind this is NOT reversible, so maybe save it under a new name, or keep a backup copy of the file, just in case something goes wrong.

View solution in original post

Translate
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 ,
Oct 25, 2022 Oct 25, 2022

You posted in the Reader forum, but the Action Wizard only exists in Acrobat (Pro). I'll move your question there.

 

Regarding your request: You can't delete it directly, but you can redact it. That would leave a white (or other solid color) rectangle on the page, though. If there are graphics around that image it will look odd. If the surrounding area is white anyway I can explain how to do it, using a script.

Translate
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 ,
Oct 25, 2022 Oct 25, 2022

Thanks for the quick answer.

Yes please, this is exactly what we´d need.

Translate
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 ,
Oct 25, 2022 Oct 25, 2022

The first step is to identify the area you want to remove. To do so draw a Square comment over it, select it by clicking it with the mouse and then run the following code from the JS Console:

this.selectedAnnots[0].rect

Post the output here, as well as the page number where the logo image appears.

Translate
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 ,
Oct 25, 2022 Oct 25, 2022

So i identified the area i want to remove , placed a white text field over it, but i´m not sure how i proceed now.

I´m not very familiar with adobe acrobat/javasript so i would need some more help here, if possible.

Translate
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 ,
Oct 25, 2022 Oct 25, 2022

Press Ctrl+J to open the Console, paste the code into it, select it using the mouse or keyboard and press Ctrl+Enter to run it. Make sure to select the comment first, though.

Translate
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 ,
Oct 25, 2022 Oct 25, 2022

Page Number is always Page 1

Output of Console:

this.selectedAnnots[0].rect
82.07098388671875,294.1651916503906,538.5333251953125,782.902587890625

Translate
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 ,
Oct 25, 2022 Oct 25, 2022

Then you can do it using this code as a part of an Action:

 

var q = [[82.07098388671875,294.1651916503906,538.5333251953125,294.1651916503906,82.07098388671875,782.902587890625,538.5333251953125,782.902587890625]];
this.addAnnot({page: 0, type: "Redact", quads: q, fillColor: color.white});
this.applyRedactions();

 

Add a Save command after the Execute JavaScript command to save the edited file, but keep in mind this is NOT reversible, so maybe save it under a new name, or keep a backup copy of the file, just in case something goes wrong.

Translate
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 ,
Oct 25, 2022 Oct 25, 2022
LATEST

Thank you a lot for helping me out there.

It saves us a lot of time (y)

Translate
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