Although I looked through a few different threads, I couldn't find anything
that answered my exact problem (apologies if I missed something).

I am creating a PDF document that needs to support many images - upwards of
20 unique images. Generating the PDF takes ~1 second per image (my testing
determined images are the bottleneck), which is a problem as I need to
generate these PDFs dynamically, and this is just too long to wait :( ... 

Here is the code I am using for each image:

image = Image.getInstance(url);
image.setAbsolutePosition(left, top - depth);
image.scaleAbsolute(width, depth);
d.add(image);

About half of the time per image is consumed by "image =
Image.getInstance(url);" - unfortunately, I don't think there's an
alternative here, however if anyone has a faster way of doing this, that'd
be appreciated.

However, the other time consumption is due to actually adding the images to
the document - my question is if there's a way to speed up this step.

Of course, if this is the best performance I can expect from iText, that
would be great to know too, so that I can start looking into other PDF
libraries.

Thanks!
-- 
View this message in context: 
http://itext-general.2136553.n4.nabble.com/Image-Speed-tp2230840p2230840.html
Sent from the iText - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------

_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
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/

Reply via email to