Java script adobe
Hvor pakker jeg denne script ind i en funktion, som skal afvikles inde i adobe 10 under Action/* Put script title here */
this.pageNum = 0;
for (var p = 0; p < this.numPages; p++)
{
var numWords = this.getPageNumWords(p);
for (var i=0; i<numWords; i++)
{
var ckWord = this.getPageNthWord(p, i, true);
if ( ckWord == "Protection")
{
var q = this.getPageNthWordQuads(p, i);
// Convert quads in default user space to rotated
// User space used by Links.
m = (new Matrix2D).fromRotated(this,p);
mInv = m.invert()
r = mInv.transform(q)
r=r.toString()
r = r.split(",");
l = addLink(p, [r[4], r[5], r[2], r[3]]);
l.borderColor = color.yellow;
l.borderWidth = 1;
l.setAction("this.getURL('http://www.example.com/')");
}
}
}