PDF compression with Java, want size even smaller

Issues related to PDFLeo (PDF linearization, encryption and optimization) utility.

PDF compression with Java, want size even smaller

Postby PDF compression on Tue Oct 18, 2011 1:57 pm

I am using Apache Fop 1.0 to create PDF documents, which uses the FlateFilter to compress the content. The FOP uses the DeflaterOutputStream DEFAULT_COMPRESSION under the cover. I have not found any possibility to set it to BEST_COMPRESSION.

The PDF contains several images generated by a graphics program. Those generated images are quite huge.

Is there anyway to reduce the file size.
PDF compression
 

Re: PDF compression with Java, want size even smaller

Postby glitch on Tue Oct 18, 2011 3:00 pm

You can put objects into stream and compress the stream. See this example:
Code: Select all
C:\>pdfleo --data-streams=compress \
   --object-streams=generate source.pdf target.pdf


FOP does not support object streams.

Reference: http://mdn.morovia.com/manuals/pdfleo-1 ... php#N102DA
The information above is provided "AS IS", with no warranties, and confers no rights.
User avatar
glitch
Support Engineer
 
Posts: 198
Joined: Wed May 14, 2008 2:42 pm


Return to PDFLeo 1.x

Who is online

Users browsing this forum: No registered users and 0 guests