Hi everyone, 
 
I am having a performance issue with iText that I need help with. All I
want to do is pull out various pages from a large PDF to create many
smaller PDF's. For my test, the large PDF is 22,000 pages, and I'd like
to split it such that every two pages or so is placed in to it's own
PDF. So it would generate 11,000 PDF's aprox. The problem is that it
takes over 9 hours. I've isolated it down to the writer's
".getImportedPage()" function. When I take that function out, it
produces 11,000 PDF's in 7 minutes!  I've tried pdfCopy, pdfStamper,
adding the template, wrapping the page in an image object, and the
performance is still poor. Does anyone know how to do this more
efficiently?
 
This is how I'm splitting the PDF, and it's very slow:
 
PdfImportedPage page = null;
PdfContentByte cb    = PDFwriter.getDirectContent();
page = PDFwriter.getImportedPage(PDFreader, iPages);
cb.addTemplate(page, 1f, 0, 0, 1f, 0, 0);

 
I tried using the image object, and it seems to be a bit faster but not
much.
 
PdfImportedPage page = PDFwriter.getImportedPage(PDFreader, iPages);
Image image = Image.getInstance(page);
PDFdoc.add(image);

Thanks.
 
Alex
 

This message and any attachments are intended only for the use of the addressee 
and
may contain information that is privileged and confidential. If the reader of 
the 
message is not the intended recipient or an authorized representative of the
intended recipient, you are hereby notified that any dissemination of this
communication is strictly prohibited. If you have received this communication in
error, please notify us immediately by e-mail and delete the message and any
attachments from your system.

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
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/

Reply via email to