I have a DB with 2,533,228 PDF stored as blobs.  Most of those PDFs have
some HQ images, designed to be printed on a 300 or 600 dpi printer.  I
would like to download and optimize those PDFs with low quality versions
of the same image and then reload them.

Something like:

List<Long> accountList = select account from statements;
For(Long id : accountList){
        Byte[] pdf = select statement from statements where account = id
        pdf = optimizePdf(pdf);
        update statements set statement = pdf where account = id
}

The obvious trick is the optimizePdf method.  I know with Adobe Pro
there is an optimize option that took a 700KB statement down to like
36KB.  When I opened the optimized statement, it was obvious the
marketing images where very grainy and that's where most of the
optimization came from.  Can you get the images from each page of a pdf
and, if the image is for size X or larger, resize the image and reinsert
it?  There could be more than one image on a page, but marketing content
is by far the "largest" in terms of byte size or viewable size.

Any suggestions?

Jason Berk


This is a transmission from Purdue Federal Credit Union (Purdue Federal) and is 
intended solely for its authorized recipient(s), and may contain information 
that is confidential and or legally privileged. If you are not an addressee, or 
the employee or agent responsible for delivering it to an addressee, you are 
hereby notified that any use, dissemination, distribution, publication or 
copying of the information contained in this email is strictly prohibited. If 
you have received this transmission in error, please notify us by telephoning 
(765)497-3328 or returning the email. You are then instructed to delete the 
information from your computer. Thank you for your cooperation.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to