> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Karol Bryd
> Sent: Wednesday, April 23, 2008 10:41 PM
> To: iText-questions@lists.sourceforge.net
> Subject: [iText-questions] Memory usage vs. performance
>
> Hello
>
> I have two questions to iText developers:
>
> 1. I am working on improving memory usage and processing speed of my
> watermarking application and I have noticed that when I use following
> constructor:
>
> result = new PdfReader(new
> RandomAccessFileOrArray(fileName), null);
>
> then memory usage is in one particular case about 136MB (max) and
> processing time is about 80 sec.
>
> When I change that constructor to
>
> result = new PdfReader(fileName);
>
> then processing time drops to 23 seconds BUT at the same time memory
> usage jumps to 392MB. Input file has 32MB (PDF reference book from
> Adobe).
>
That file has everything: it's big, has many objects and they are
compressed.
> Is there anything that I can do to have 23 seconds processing time AND
> at the same time memory usage of 136MB? :)
>
No. Some files will take a lot of time and memory. You may try
Document.plainRandomAccess=true.
> 2. Are there any architectural limitations in iText that could prevent
> adding linearization feature?
>
No. Linearization is an operation that can only be carried out after the
PDF is completed. It can be done but nobody has.
Paulo
Aviso Legal:
Esta mensagem é destinada exclusivamente ao destinatário. Pode conter
informação confidencial ou legalmente protegida. A incorrecta transmissão desta
mensagem não significa a perca de confidencialidade. Se esta mensagem for
recebida por engano, por favor envie-a de volta para o remetente e apague-a do
seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de
usar, revelar ou distribuir qualquer parte desta mensagem.
Disclaimer:
This message is destined exclusively to the intended receiver. It may contain
confidential or legally protected information. The incorrect transmission of
this message does not mean the loss of its confidentiality. If this message is
received by mistake, please send it back to the sender and delete it from your
system immediately. It is forbidden to any person who is not the intended
receiver to use, distribute or copy any part of this message.
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Do you like iText?
Buy the iText book: http://www.1t3xt.com/docs/book.php
Or leave a tip: https://tipit.to/itexttipjar