Quoting "Tiesters, Timothy [PRDBE Extern]" <[EMAIL PROTECTED]>:
> Hi > > Is there any possibility to attach an image to a pdf, and show this > image in a pdf, without the image being stored a second time in the > pdf? Of course that's possible. As a matter of fact iText does this automatically. For instance: the following code adds the same image on two different pages: Image img = Image.getInstance(pathToImage); document.add(img); document.newPage(); document.add(img); Internally, the bits and bytes of the image are added only once. Of course, if you WANT the image to be added twice, you'd have to do it like this: Image img1 = Image.getInstance(pathToImage); document.add(img1); document.newPage(); Image img2 = Image.getInstance(pathToImage); document.add(img2); Here the bits and bytes are added twice because you are creating two different instances of the iText Image object. > I've read iText in action and the pdf-reference. But I'm not sure I > found something.. Could an XObject help me with this? I'm sure it's mentioned on different places, only: why are you concerned with this? If you do it right (first code snippet), you don't have to worry about all this. -- This answer is provided by 1T3XT BVBA ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Register now and save $200. Hurry, offer ends at 11:59 p.m., Monday, April 7! Use priority code J8TLD2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Do you like iText? Buy the iText book: http://www.1t3xt.com/docs/book.php Or leave a tip: https://tipit.to/itexttipjar