Leadtools.Pdf Namespace > PDFDocumentPage Class : Hyperlinks Property |
public IList<PDFHyperlink> Hyperlinks {get;}
'Declaration Public ReadOnly Property Hyperlinks As IList(Of PDFHyperlink)
'Usage Dim instance As PDFDocumentPage Dim value As IList(Of PDFHyperlink) value = instance.Hyperlinks
public Windows.Foundation.Collections.IVector //In WinRT the IListinterface is replaced by IVector <PDFHyperlink> Hyperlinks {get;}
get_Hyperlinks();
public: property IList<PDFHyperlink>^ Hyperlinks { IList<PDFHyperlink>^ get(); }
By default, the Fonts, Annotations, Objects and Hyperlinks lists are not populated when a new PDFDocument is created and the values of these properties are null (Nothing in Visual Basic). You must call the PDFDocument.ParsePages method to parse the items are you interested in (depending on the PDFParsePagesOptions passed as the options parameter to the method). This is done for performance reasons and to give the user the ability to parse only the objects and pages of interest.
The Hyperlinks list will be populated if PDFParsePagesOptions.Hyperlinks is passed as part of the options parameter to PDFDocument.ParsePages. After this method returns, all the pages parsed will have their Hyperlinks properties populated either with a list of the hyperlinks found in the page or an empty list (with IList<PDFObject>.Count equals to 0).
When parsing is finished, the Objects and Hyperlinks properties will contain a list of the PDFObject and PDFHyperlink items found in the page (if PDFParsePagesOptions.Objects and PDFParsePagesOptions.Hyperlinks was selected). Each of these items contain a PDFTextProperties object that contain the text properties of the item such its font information and color. One of these properties is PDFTextProperties.FontIndex which is the 0-based integer index to the font of the item in the Fonts list.
If PDFParsePagesOptions.Fonts is not passed to PDFDocument.ParsePages, but PDFParsePagesOptions.Objects and PDFParsePagesOptions.Hyperlinks was selected, then the fonts are not parsed and the PDFTextProperties.FontIndex value of any returned object will be 0.
For an example on general parsing of PDF pages, refer to PDFDocumentPage, for an example on drawing the objects of a page on the surface of an image, refer to PDFObject.
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2