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.
> 
> 
********************************************************************************
**************
> IMPORTANT: The contents of this email and any attachments are confidential. 
> They are intended for the
> named recipient(s) only.
> If you have received this email in error, please notify the system manager 
> or the sender immediately and do
> not disclose the contents to anyone or make copies thereof.
> *** eSafe scanned this email for viruses, vandals, and malicious content. 
> ***
> 
********************************************************************************
**************
> 
> ------------------------------------------------------------------------------
--
> 
> > -------------------------------------------------------------------------
> > 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
> > iText-questions <at> lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/itext-questions
> > Buy the iText book: http://itext.ugent.be/itext-in-action/
> > 
> 
> -------------------------------------------------------------------------
> 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
> iText-questions <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> Buy the iText book: http://itext.ugent.be/itext-in-action/
> 
> 


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



-------------------------------------------------------------------------
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