2 Replies Latest reply on Apr 14, 2008 11:32 AM by (Aandi_Inston)

    links and images

    Level 1
      1) Is there any way to add/move a hyperlink through javascript?

      2) Is there any way to add/move an image through javascript?
        • 1. Re: links and images
          Level 1
          Hm.. ok I see that I can do something like this:

          var link1 = this.addLink(i, [50,50,100,100]);
          link1.borderColor = color.red;
          link1.borderWidth = 10;
          link1.setAction( "myFunction();");

          But what I actually wanted was to make either a text link, or an image link... not a box link. (I want to add the text or image as well).

          Is this possible?
          • 2. Re: links and images
            (Aandi_Inston) Level 1
            There is actually no such thing in PDF as a text or image link. All
            links are box links. That is to say, the text and images are
            completely independent (the "real" PDF if you like), while all links
            are just rectangles with actions attached to them.

            JavaScript provides no tools for adding real text nor real images.

            You might like to look into whether you can get what you want with
            some kind of form field.

            Aandi Inston