can plain text be removed with JavaScript? One can remove fields, icons etc,
but I can't figure out how to remove/delete plain text. In IAC there's mention of 'destroy', I've tried it on text, doesn't seem to do anything:
gpAvText = gPdDoc.CreateTextSelect(i, Rect)
numtxt = gpAvText.GetNumText
For ii As Integer = 0 To numtxt - 1
If gpAvText.GetText(ii) = "Acrobat" Then
MsgBox("found")
gpAvHilite.Add(ii, 7)
End If
Next
gpAvText2 = gPDPage.CreateWordHilite(gpAvHilite)
gAvDoc.ShowTextSelect()
MsgBox(gpAvText2.GetText(0)) //make sure it's the right text
res = gpAvText2.Destroy() //res turns out to be -1, means succes
Any suggestions?
Form feilds and comment annotations are separate interactive elements that float above the content. JavaScript was written specifically for handling the interactive elements.
However, you can use the IAC and JavaScript to add content to a page. For example, you could place a solid white box (a form field or square annotation) over some text and then flatten it, to make it look like the text has been deleted. This is as good as it gets.
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script