I have a couple of documents that have common graphics and text used on every page.
In the past I have used the Touchup tools to remove these objects by hand as they are no longer needed for the intended audience.
This got me thinking if it was possible to write a script to automate the process.
Has anyone done this before? Or perhaps you have some sample code that I could use to develop.
I know the object names that identify them in the Cos tree. Is this a complex undertaking or could it done without writing pages and pages of code?
Any hints, tips, pointer or code would be most welcome.
Thankyou.
But there is some undocumented and indirect ways to get access to the content. Don't know if either will help you. First, preflight has been added to the JS DOM in Acrobat 9.1. Download the latest SDK and look in the Document Object. You might be able to create a preflight profile that does what you want, I don't know.
Next, I won't tell you how its done, but if you know a bit about Acrobat JavaScript you can get the raw bytes for the PDF file. If you want to write a PDF parser you could conceivably modify the cos level structure of a PDF from JavaScript. I wouldn't recomend this though;)
Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]
The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]
Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script