Y Fang wrote:
> In other words, it is rather unclear (and still is) why the Image
> produced by the following method:
[1]
> PdfImportedPage page = tmpWriter.GetImportedPage(new
> PdfReader("test.pdf"), 1);
> Image image = Image.GetInstance(page);
> is somehow different to the Image produced by this method.
[2]
> Image image = Image.GetInstance("image.jpg");
[2] is a raster image: bits and bytes that are self contained.
In PDF lingo: an image XObject
[1] is a stream of PDF syntax + resources such as fonts, images,...
In PDF lingo: it's a form XObject
With [2], you have all the necessary data in the Image object.
With [1] all resources that are referred to from the content stream
are copied to the Writer (tmpWriter) when you do getImportedPage().
The Image obtained with Image.getInstance(page) isn't self contained.
It needs the resources that are already copied to tmpWriter when
invoking getImportedPage().
The difference between an image XObject and a form XObject is
explained in the book: chapter 10. That's a chapter that isn't
available for free, so you might want to buy the book anyway.
--
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions:
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/