On 11/13/19 11:24 AM, Tilman Hausherr wrote:
Am 13.11.2019 um 09:33 schrieb Damien Levasseur:
Hello all,

When i extract images (version 2.0.17, using PDResources, COSName, PDXObject, PDImageXObject), i correctly get all distinct images, but same image is extracted only once. In the pdf file i'm trying to work on, there is one image repeated 3 times, and i wanted to get that.

How can i get a list of resources instead of Dictionary? Or get number of occurence or position of a repeated image?

Thanks


Hi,

The easiest would be to take the source code of the ExtractImages tool, and simply remove the duplicate check.

                if (seen.contains(xobject.getCOSObject()))
                {
                    // skip duplicate image
                    return;
                }


Ah, cool. I suppose at the bottom it's doing what my code does, but instead lets PDFBox do most of the work.

Brian

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org

Reply via email to