Erik, you can "preload" the image using the XML Graphics Commons image loading framework (which FOP uses, too): http://xmlgraphics.apache.org/commons/image-loader.html#preloading
The ImageInfo object will then contain the intrinsic size. You can use the ImageManager from the FopFactory and probably re-use the ImageSessionContext from the FOUserAgent: ImageManager imageManager = fopFactory.getImageManager(); ImageSessionContext imageSessionContext = foUserAgent.getImageSessionContext(); This allows you to profit from the image cache. What you do with the values and where exactly you want to write it in the PDF is a different question. I don't know what you have in mind here. Do you want to print the values on the page along with the image? Sounds like an XSLT extension then. On 26.07.2011 18:42:15 Erik Wiklander wrote: > Hi, > > I'm using fo:external-graphic to include images in the pdf. Is there > any way that I can find out the intrinsic width and height of an image? So > that I can include that information in the resulting pdf. > > Thanks > //Erik > Jeremias Maerki --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org