Hyperlink graphic

If you are a VB developer and have questions about using our products from VB, here is the place to post them.
Post Reply
rushing
Posts: 13
Joined: Wed Sep 10 2003

Hyperlink graphic

Post by rushing »

I'm currently using an evaluation copy of PDF Converter Developer for probable use in an internal application. One of the things I would like to do is to hyperlink our corporate logo on top of the page.

I have successfully created hyperlinks on text items. The documentation on the SetHyperlink method (p. 143 of "Common Driver Interface 210") is contradictory as to whether you can actually hyperlink a graphic.

It has this to say in the introduction:

The SetHyperlink hyperlink creates a hyperlink on the current printing text or image object.

However, later in the detailed description it implies that you can only set it on text elements, and in fact that seems to be my experience:

The hyperlink will be inserted at the location where the last text drawing operation occurred.

Questions: Can I hyperlink a graphic. (I'm using Printer.PaintPicture to insert it)?

If not, what is the best way to fake it? Would it work if I printed white text underneath my graphic in a box the same size? Are there other methods that others have used?
rushing
Posts: 13
Joined: Wed Sep 10 2003

My Answer

Post by rushing »

I'll answer my own question for others who might search for this.

I was not able to get the graphic to link directly, however, I did find that the following would work:

1. Print the graphic.
2. Set the font size large enough to cover the height of the graphic
3. Print non-breaking spaces the width of the graphic
4. Set the hyperlink

NOTES: You must use non-breaking spaces because PDF Creator apparently uses normal spaces to determine where to break the hyperlink. In fact, they must use some concept of whitespace because a linebreak also has the same effect. I first tried printing my spaces on multiple lines, but only the last line was actually hyperlinked. That is the reason for setting the font size in step 2. This will probably break if Amyuni ever includes the non-breaking space in the whitespace characters they are searching for.

It is also a big pain in the but because it was trial and error to get the fontsize correct and the number of spaces.

If someone has a better solution, I'd love to hear it.
Dany
Amyuni Team
Posts: 113
Joined: Wed Sep 11 2002
Location: Montreal.
Contact:

Hyperlinks are not created in the right location

Post by Dany »

This is recognized as a bug in the PDF Converter product. The hyperlinks on graphics and images appear in the wrong place on the page.

This is fixed in version 2.10f, due for release September 19, 2003.

Amyuni Development Team
Post Reply