Venkat Reddy <vanukuri.venkat <at> googlemail.com> writes: > > Hi, > > When I extracted content from the PDF file that you attached in this > mail. I have got only one image file from that, which is what expected > right? > I have used Nitro PDF tool to extract text and images from a PDF file. I > have got only one image when I extracted from png.pdf file. > > Cheers, > Venkat. > umk wrote: > > Can someone help me understand why the attached FO sample (PNG.fo) generates > > a PDF with multiple images. You don't see the images when opening the PDF > > with Adobe Reader but if you open it with a text editor, you will find two > > "/Image" sections (they also have the same dimensions). > > > > The reason this is a problem is that we run automated tests on our PDFs to > > ensure that the correct number of images are found. So, in our case, the > > test finds 2 images when reading the PDF instead of 1. > > > > Can anyone shed light on why this is happening? > > > > Running FOP v0.95 and JDK 1.6 > > > > Thank you! > > > > http://www.nabble.com/file/p25530904/PNG.fo PNG.fo > > http://www.nabble.com/file/p25530904/sample.png sample.png > > http://www.nabble.com/file/p25530904/png.pdf png.pdf > > > > >
Venkat, thanks for replying. I have used two tools to extract images from the PDF file (PDFBox & iText) and they both find an extra image. Please open the PDF with a text editor and notice that there are in fact two "/Image" sections. The one has much more data (the valid one) that the other. If I remove the fo:external-graphic element from the .fo file, both "/Image" sections are removed. And get this: if I reference a different png file, I get only ONE "/Image" section in the PDF. Something about the dynamically generated png results in two "/Image" sections in the PDF. Ideas? --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
