Samuel Viana wrote:
>I'm working with electronic invoices and I use intensively iText for generating
>thousands of them in series. My question relates with the way of how iText does
>its job in generating the PDF. It writes all in memory and only in the end of
>execution writes to disk, or works writing in little chunks to the disk ?
It writes something to the OutputStream everytime a page is complete
(this is the fastest way to create the PDF). It's up to you to choose the
OutputStream. If you want to generate everything in memory first, you
can write to a ByteArrayOutputStream. If you want to write everything
to disk, choose a FileOutputStream.
> If it
>uses intensively the disk, it certainly create some bottlenecks in the
>performance of generating thousands of PDFs just as I need iText to do.
I'm not sure if this assumption is correct in every case, but it doesn't
matter: you can choose the OutputStream.