Duplicate images in PDF > Find which pages it occurs on
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 2.7k
- Forks
- 579
- Avg merge
- 2m
- Merged PRs (30d)
- 1
Description
Hi!
I've got a document which contains several duplicates of images, getObjectsByType('XObject', 'Image') gets all the images but seems to "skip" or combine duplicates. Usually this wouldn't be a problem but I am relying on the specific order of the images.
Is one of the following solutions possible?;
-
Loop through each page and get the Xobjects from the specific page (getObjectsByType doesn't work in the getPages() loop)
-
Check the getDetails() (or something similar) of the object to see which pages it occurs on?
-
Disable the skip/combine function and obtain all images
Many thanks in advance! :)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the duplicate-image behavior with getObjectsByType('XObject', 'Image') and compare it with access through getPages(). Review the available getDetails() behavior and how image XObjects are collected, then define which page association and ordering should be preserved. Done means the selected behavior is documented by a regression case and works for PDFs containing duplicate images.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100