Depending on what you do in PdfStamper some PDFs will always require a
lot of memory. iText is not optimized for very big files.

Paulo 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Eyal z
> Sent: Thursday, May 03, 2007 11:10 AM
> To: [email protected]
> Subject: Re: [iText-questions] PDF optimizer
> 
> Paulo Soares <psoares <at> consiste.pt> writes:
> 
> > 
> > No to both questions. For the last part of the question you 
> may need 
> > PdfStamper.setFullCompression().
> > 
> > Paulo
> > 
> > ----- Original Message ----- 
> > From: "Eyal Zizi" <eyalz <at> cerylion.net>
> > To: <itext-questions <at> lists.sourceforge.net>
> > Sent: Thursday, May 03, 2007 9:05 AM
> > Subject: [iText-questions] PDF optimizer
> > 
> > Hi,
> > 
> > Does iText library supports PDF optimizer that has been 
> introduced in
> > Adobe acrobat professional 7.0? If not, will it be in the 
> next release?
> > I know that there is no problem loading document that has 
> been optimized
> > but when I try to save it back to disk it returns to its 
> original size
> > (e.g. 140MB file with ~1400 pages has been optimized and shrinked to
> > ~30MB but when I open and save it with iText it returns to 140MB).
> > 
> > Thanks
> > Eyal z.
> 
> Hi,
> Thanks for the quick answer.
> 
> I tried PdfStamper.setFullCompression() and it throw an 
> OutOfMemory error when 
> I ran my application in debug mode (I set memory allocation 
> vars -Xmx600m -
> Xms300m) and the process suspended with OutOfMemory error so 
> I tried to exceute 
> the application not in debug mode with memory allocation 
> -Xmx1300m -Xms900m, 
> this ran okay but it took ~90-100% of CPU usage and java 
> process gained 1GB of 
> memory, the whole process last ~10 minutes (the file I tried 
> to load is 22MB of 
> optimized PDF, [the original file size was 140MB])
> I'm running on Intel P4 2.66Ghz with 2.5GB RAM, Windows XP 
> SP2 and Java 1.6.0
> 
> Is there a way to reduce this memory allocation? 
> here is code example of what I'm writing:
> 
> RandomAccessFileOrArray rafa = new RandomAccessFileOrArray( 
> fileName );
> PdfReader reader = new PdfReader( rafa,null );
> PdfStamper stamper = new PdfStamper( reader,fileOutputStream );
> stamper.setFullCompression();
> .
> .
> .
> stamper.close()
> 
> thanks
> Eyal


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 DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to