I have a table in MS SQL with a binary column. Over time people have uploaded files into it that are mostly pdf (with embedded images) and JPG's however the file sizes on some of them are huge. I am assuming that is becuase they have scanned them at too high a resolution. I am trying to develop a one size fits all solution to shrink the files. I do not know the embedded image formats in the pdfs and JPG's will not compress, therefore compression tools will not work.
My Idea is to develop a script to parse through the 8000 files and use an api to print them at a standard 100dpi (something like cutepdf) to a pdf format and then re-import the resultant pdf image into the sql table. Does anyone have any experience with this type of approach? Is it a feasable approach or is there a better way to do this?