frabjous,
first thank you for the speedy response.
after looking at pdfstripper.jar, it does not look like the tool i was hoping for. i would have to rename my before i run it, and rename it after it is run. it appears to be a wrapper around the itext class library, that is then in turn run by a wrapper around a java tool (ant). i was hoping for something a little 'cleaner' (i.e. <command> <input pdf> <output pdf> ).
(this is more of a philosophical thing. i am the lead architect on a 300k plus line java-based open source project...)
i am wondering if 'pdftk flatten' is the correct tool, as it has not been updated in quite some time (nov 2006) , and might not be 'script aware' in most cases.
looks like my choices are (in no order)
- convert to a better 'print ready' format, and back again.
- bite the bullet and write a program that uses the itext class myself.
(in all my copious free time not spent changing diapers, babysitting engineers - no, they are not the ones in diapers, and launching a startup.)
- be the one to write the bash script that uses pdftk to flatten --> filter out java script using sed/awk/etc --> re-compress
*sigh*
and on a timely note, saw this article referenced on slashdot a few hours after i posted my plea for help:
from the article:
Computerworld - Just hours before Adobe is slated to deliver the latest patches for its popular PDF viewer, a security firm announced that by its counting, malicious Reader documents made up 80% of all exploits at the end of 2009.
According to ScanSafe of San Bruno, Calif., vulnerabilities in Adobe's Reader and Acrobat applications were the most frequently targeted of any software during 2009, with hackers' PDF exploits growing throughout the year.
In the first quarter of 2009, malicious PDF files made up 56% of all exploits tracked by ScanSafe. That figure climbed above 60% in the second quarter, over 70% in the third and finished at 80% in the fourth quarter.
looks like i need this tool more than ever !
-michael