Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

PDF Word Link (See related posts)

// Find Word(s) on Current Page and add link

var numWords = this.getPageNumWords(this.pageNum);
p = this.pageNum;

for ( var i=0; i<numWords; i++){
    var ckWord =  this.getPageNthWord(p,i,true);;

    if(ckWord == "Solo")
    {
        var q = this.getPageNthWordQuads(p,i);

        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.red;
        l.borderWidth = 1;
        l.setAction("this.getUrl('http://www.adobe.com/');");

    }


}

You need to create an account or log in to post comments to this site.


Click here to browse all 5137 code snippets

Related Posts