I'm currently using Docotic PDF library to write a compression program for a PDF file server hosting large scanned documents. (Intention is to get the smallest size in black and white that maintains a readable document- mostly legal briefs)
In testing I notice that certain files will respond better to JPEG compression while others respond better to Group3Fax or Flate. Is it possible to analyze the file and make an intelligent decision on which algorithm will produce the smallest PDF or would I actually have compress each file with all three algorithms and choose the smallest - which is incurs a ton of additional CPU overhead.
Any guidance is greatly appreciated. Thanks