Each week my company gets product labels printed. I have a PHP script which uses FPDI to generate a few PDFs to send to our print shop. Combined they are about 500 pages. Once opened in Acrobat, they take a long time to spool. Acrobat reports that each page is being "flattened" as the progress bar ticks away.
We are trying to streamline the process to not take so long to spool, so I have been trying to find a way to flatten the file programmatically, but have struggled to find relevant web results for the goal.
Most of what I find seems to pertain to single-page flattening. When I try to follow such methods, I wind up with a single-page file that has all the other pages smushed on top of each other.
convert -density 300x300 -colorspace RGB file.pdf -quality 100 -flatten fileFlat.pdf
If anyone can help point me in the right direction to emulate what Acrobat is doing, it would be greatly appreciated.