Select the repeated object in each page by Javascript or any workaround?
Moderators: Daniel - PDF-XChange, PDF-XChange Support, Vasyl - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Paul - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
Select the repeated object in each page by Javascript or any workaround?
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.
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.
- Stefan - PDF-XChange
- Site Admin
- Posts: 19788
- Joined: Mon Jan 12, 2009 8:07 am
- Contact:
Re: Select the repeated object in each page by Javascript or any workaround?
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
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
- Paul - PDF-XChange
- Site Admin
- Posts: 7356
- Joined: Wed Mar 25, 2009 10:37 pm
- Contact:
Re: Select the repeated object in each page by Javascript or any workaround?
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:
Alternatively you can use the "Content Pane" to select all images
Does that help?
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:
Alternatively you can use the "Content Pane" to select all images
Does that help?
Best regards
Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
Re: Select the repeated object in each page by Javascript or any workaround?
Hi Stefan,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
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+...

Re: Select the repeated object in each page by Javascript or any workaround?
The replace tool work in my sample pdf, but not the actual pdf... I don know why but that is helpless....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 second method is also not working since there are other thousand pictures which I dont need delete them.
Anyway, thanks for the reply.
Re: Select the repeated object in each page by Javascript or any workaround?
Is there any way to select the object by width/height, position or color?




- Stefan - PDF-XChange
- Site Admin
- Posts: 19788
- Joined: Mon Jan 12, 2009 8:07 am
- Contact:
Re: Select the repeated object in each page by Javascript or any workaround?
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: 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
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: 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
Re: Select the repeated object in each page by Javascript or any workaround?
Hi,
This works but not 100%, thus; i merged a 8 pdf into 1 pdf, i have to do this operation 8 times, when changing at the begining it does not change more than first pdf, even the image is the same (i guess, since Properties does not give id or name).
Is there any Javascript method?
Thank you,
This works but not 100%, thus; i merged a 8 pdf into 1 pdf, i have to do this operation 8 times, when changing at the begining it does not change more than first pdf, even the image is the same (i guess, since Properties does not give id or name).
Is there any Javascript method?
Thank you,
- Stefan - PDF-XChange
- Site Admin
- Posts: 19788
- Joined: Mon Jan 12, 2009 8:07 am
- Contact:
Re: Select the repeated object in each page by Javascript or any workaround?
Hello joxeme,
The "select all instances" will work when the same image object is repeated 8 times on 8 separate pages.
If you merge 8 documents into one - even if the image is visually the same - each page came with it's own copy of an image file and the Editor (or any other tool) will see those as 8 separate images, and no way to recognize that they are the same virually.
If they are located in the same coordinates - you can try to redact out that area of your pages, but that will remove more than just the image itself, so might again not be ideal.
Kind regards,
Stefan
The "select all instances" will work when the same image object is repeated 8 times on 8 separate pages.
If you merge 8 documents into one - even if the image is visually the same - each page came with it's own copy of an image file and the Editor (or any other tool) will see those as 8 separate images, and no way to recognize that they are the same virually.
If they are located in the same coordinates - you can try to redact out that area of your pages, but that will remove more than just the image itself, so might again not be ideal.
Kind regards,
Stefan
Re: Select the repeated object in each page by Javascript or any workaround?
Ok that makes sense.
How can i "redact out that area of the pages"??
Thank you,
How can i "redact out that area of the pages"??

Thank you,
- Stefan - PDF-XChange
- Site Admin
- Posts: 19788
- Joined: Mon Jan 12, 2009 8:07 am
- Contact:
Re: Select the repeated object in each page by Javascript or any workaround?
Hello joxeme,
Please take a look here on how to use redaction in general:
How to use Redaction
And this page while speaking of "page numbers" is effectively showing you how to apply a redaction to the same position of all pages in a file:
Can I use PDF-XChange Editor to add/remove page numbering?
Kind regards,
Stefan
Please take a look here on how to use redaction in general:
How to use Redaction
And this page while speaking of "page numbers" is effectively showing you how to apply a redaction to the same position of all pages in a file:
Can I use PDF-XChange Editor to add/remove page numbering?
Kind regards,
Stefan