PDFReader does NOT read the entire PDF into memory!  It only reads what it 
needs to (aka "on demand, random access").

PDFReader can do a memory stream, but you need the ENTIRE file in memory in 
that case, since it needs random access. If you have the memory, then clearly 
using memory for temp vs. disk is going to be better - but that assumes you can 
allocate the mrmory...

Leonard

-----Original Message-----
From: warren [mailto:warrenonsourcefo...@charter.net] 
Sent: Sunday, March 21, 2010 4:55 PM
To: itext-questions@lists.sourceforge.net
Subject: Re: [iText-questions] Perfomance Question - ByteArray vs Files

Background:

My current process is:

I create a PDF file on the server using PDFWriter in the first pass.

I read it back in with PDFReader to make the second pass

I use PDFStamper to add headers, etc. to the over layer, creating a new file 
in the process.

I thought about trying to extend the Page event to get it done in one pass 
but, because of server restrictions which I won't go into, I can't do that.


The Question:

If PDFReader birngs the whole PDF into memory anyways, would it be better to 
have PDFWriter put out a ByteArrayOutputStream?

Can PDFReader even pick up this type of output?  If I have to do a 
conversion, there might not be a net advantage.

And yes, I plan on coding both methods and monitoring the server as best I 
can to see which code package has the least impact under various conditions. 
Assuming PDFReader can bring in a ByteArrayOutputStream. 


------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
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/

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
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