Components for Developers
© 2000-2008, Two Pilots

PDF Library Download Features Manual Tutorials FAQ Pricing HTML2PDF Add-on History In the Lab

PDF Creator Pilot documentation

Download CHM version of this manual.
Common
Collapse All

This method creates an active hyperlink area in a PDF document.

Syntax

HRESULT AddHyperLink (
FLOAT left,
FLOAT top,
FLOAT right,
FLOAT bottom,
BSTR url
)
Parameters
left
X coordinate of the top-left corner of the bounding rectangle

top
Y coordinate of the top-left corner of the bounding rectangle

right
X coordinate of the bottom-right corner of the bounding rectangle

bottom
Y coordinate of the bottom-right corner of the bounding rectangle

url
String containing a URL

Return value
If successful, this method returns S_OK. If it fails, this method should return one of the error values.

Remarks

This method places an active hyperlink area for the rectangle bounded by coordinates (left, top, right, bottom). The URL (Uniform Resource Locator) parameter should be a string specifying a standard URL used in World Wide Web address specification such as "http://www.colorpilot.com/" or "mailto:support@colorpilot.com".

Example

Adding a Hyperlink

Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.ShowTextAt(50, 50, 'Click me');
PDF.AddHyperLink(50, 50, 100, 60, 'http://www.google.com');
PDF.SaveToFile('test.pdf', true);
C/C++
[copy to clipboard]
// PDF object is supposed to be created
PDF->ShowTextAt(50, 50, "Click me");
PDF->AddHyperLink(50, 50, 100, 60, "http://www.google.com");
PDF->SaveToFile("test.pdf", true);
C#
[copy to clipboard]
// PDF object is supposed to be created
PDF.ShowTextAt(50, 50, "Click me");
PDF.AddHyperLink(50, 50, 100, 60, "http://www.google.com");
PDF.SaveToFile("test.pdf", true);
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
PDF.ShowTextAt 50, 50, "Click me"
PDF.AddHyperLink 50, 50, 100, 60, "http://www.google.com"
PDF.SaveToFile "test.pdf", true

See Also

PDF Library Download Features Manual Tutorials FAQ Pricing HTML2PDF Add-on History In the Lab

 

 

PDF Library | Virtual Printer | Converters to PDF

Support | Blog | Forum | Contacts

© 2000-2008, Two Pilots