This is a real tricky one. And it's something you can actually do in a kind of indirect way. But you'll need Acrobat 9 or later. There's no way to do this in Acrobat 7.
Here's the process.
1. Loop through all words on all pages, using "doc.getPageNumWords()" and "doc.getPageNthWordQuad()" to find the bounding box of each word. 2. Unless the word is rotated, the height of the bounding box will be the point size of the text. 3. When a height exceeds your limit, use the quad to place a redaction annot over the word. 4. At the end use the "doc.applyRedactions()" function.
Here's the process.
1. Loop through all words on all pages, using "doc.getPageNumWords()" and "doc.getPageNthWordQuad()" to find the bounding box of each word.
2. Unless the word is rotated, the height of the bounding box will be the point size of the text.
3. When a height exceeds your limit, use the quad to place a redaction annot over the word.
4. At the end use the "doc.applyRedactions()" function.
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script