0 Replies Latest reply on Nov 13, 2014 1:49 AM by Peter Hvirring

    Greate link

    Peter Hvirring

      Function I have some PDF documents which are made from an Access Database, these contain some product Numbers. How to make a link with a picture, this process can be run automatically.

      Once the files are created in PDF format from Access, which created a text file with the item number. And the image name

      item                Image
      100062701    100067701.jpg

      Acrobat calls for the loop and then run the rest of the code


        for (var p = 0; p< this.numPages; p++)


         var numWords = this.getPageNumWords(p);

         console.println("Side.: " + p + " Ord.: " + numWords);

         GreateLink(100062701, numWords,"100062701.jpg");


      How do I create a loop that reads a record and call the Great Link finds a match and create link.



      function GreateLink(catword, nword, catimage) 
        for (var i=0; i<nword; i++)
          var ckWord = this.getPageNthWord(p, i,true);
          if (ckWord == catword)
            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.red;
           l.borderWidth = 1;
           l.setAction("this.getURL('N:/ image/"+ catimage + "')");