Select the repeated object in each page by Javascript or any workaround?

Forum for the PDF-XChange Editor - Free and Licensed Versions

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Post Reply
OngICITi
User
Posts: 4
Joined: Wed Jul 28, 2021 2:20 pm

Select the repeated object in each page by Javascript or any workaround?

Post by OngICITi »

Hi there,

I have a image object on the each page repeatably, its width and height(let say 400*200) is the same in each page....
Any way to select all of them in a simple way? The file has 700 pages, I don't want to do it one by one. Please help.

P.S. That is not watermark, coz I cant remove it by watermark methed.
P.SS. It can't be handled by redaction tool, coz there are many layer above it.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Select the repeated object in each page by Javascript or any workaround?

Post by Tracker Supp-Stefan »

Hello OngICITi,

Are those copies of the same image (e.g. a logo that has been duplicated multiple times over your file)?
Also - even if there are other objects that might overlap that same area - from your description it seems like you want that particular image removed - so would the other objects that are in the same part of the page relevant and are they absolutely necessary to be preserved?

Can you share a sample PDF with us (just a few pages should be enough)?

Kind regards,
Stefan
User avatar
Paul - Tracker Supp
Site Admin
Posts: 6837
Joined: Wed Mar 25, 2009 10:37 pm
Location: Chemainus, Canada
Contact:

Re: Select the repeated object in each page by Javascript or any workaround?

Post by Paul - Tracker Supp »

Hi Ongi

it depends what you want to do with the image. If you want to replace all instances of a referenced image we have a tool for that. With one of the images selected you should see the dynamic "Format" and "Arrange" tabs appear. On the format tab are some image tools, including the replace tool:
image.png
Alternatively you can use the "Content Pane" to select all images
selectAllImages.gif
Does that help?
Best regards

Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
OngICITi
User
Posts: 4
Joined: Wed Jul 28, 2021 2:20 pm

Re: Select the repeated object in each page by Javascript or any workaround?

Post by OngICITi »

Tracker Supp-Stefan wrote: Wed Jul 28, 2021 2:42 pm Hello OngICITi,

Are those copies of the same image (e.g. a logo that has been duplicated multiple times over your file)?
Also - even if there are other objects that might overlap that same area - from your description it seems like you want that particular image removed - so would the other objects that are in the same part of the page relevant and are they absolutely necessary to be preserved?

Can you share a sample PDF with us (just a few pages should be enough)?

Kind regards,
Stefan
Hi Stefan,

I upload one sample pdf here.
https://file.io/QWnZ96jNbsBL

This is the repeated image on each page... there are other image and the actual pdf is 700 pages+...
Image
OngICITi
User
Posts: 4
Joined: Wed Jul 28, 2021 2:20 pm

Re: Select the repeated object in each page by Javascript or any workaround?

Post by OngICITi »

Paul - Tracker Supp wrote: Wed Jul 28, 2021 2:46 pm Hi Ongi

it depends what you want to do with the image. If you want to replace all instances of a referenced image we have a tool for that. With one of the images selected you should see the dynamic "Format" and "Arrange" tabs appear. On the format tab are some image tools, including the replace tool:

image.png

Alternatively you can use the "Content Pane" to select all images

selectAllImages.gif

Does that help?
The replace tool work in my sample pdf, but not the actual pdf... I don know why but that is helpless....

The second method is also not working since there are other thousand pictures which I dont need delete them.

Anyway, thanks for the reply.
OngICITi
User
Posts: 4
Joined: Wed Jul 28, 2021 2:20 pm

Re: Select the repeated object in each page by Javascript or any workaround?

Post by OngICITi »

Is there any way to select the object by width/height, position or color? :oops: :oops: :oops:
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Select the repeated object in each page by Javascript or any workaround?

Post by Tracker Supp-Stefan »

Hello OngICITi,

There is an option to select all instances of an object. In your case - you can open the contents pane, and locate the image that is on the first page, then select to replace all instances of that same image with e.g. a 1x1px transparent PNG image which will effectively "remove" the original from the file, and the replacement (being transparent) will not interfere with the contents below it:
image.png
I didn't have such a transparent image at hand, but I tried replacing the original in your file with a picture I had on my desktop - and it did work, and replaced it on all pages.

Kind regards,
Stefan
Post Reply