I have a lot of PDFs that I need to fix. They have various errors such as "extended graphics state", and also some warnings. These PDFs were created on a system/application where such entries were supported by its viewer, but the application they were created with is no longer available and I need to basically clean up these PDFs so they can be viewed with a regular reader.
Is there an API (C++) I use to perform or assist in this? I've been able to fix the "extended graphics state" by replacing its entries ("/GS") with a generic fill entry ("/F") that I copied from elsewhere in the file. Making the extended graphics state an option with "BX ... EX" is preferred but wasn't working for some reason. Anyway, once I 'fix' it, I can then open it with acrobat, which performs a "rebuild" as it opens, then (aside from warnings) can be viewed fine with acrobat. But without the rebuild I can't open it anywhere else, presumably because the xref table is wrong due to the modifications.
So I guess my question is, is there something that will either 1) correct and clean PDFs automatically so I don't have to do it manually, or 2) allow me to easily perform such a PDF rebuild after I've modified it? I prefer to do this via an API (C++) since this is a step of a larger process for which the software has already been written, but I'll settle with a third-party application if something exists that can do this in an automated manner on a large scale.
If anyone has got any suggestions they will be very much appreciated. Thanks.
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25�
