Products | Support | Email a link to this topic. | Send comments on this topic. | Back to Introduction - All Topics | Help Version 19.0.4.3
|
Leadtools.Documents Namespace > DocumentText Class : AutoParseLinks Property |
public bool AutoParseLinks {get; set;}
'Declaration
Public Property AutoParseLinks As Boolean
'Usage
Dim instance As DocumentText Dim value As Boolean instance.AutoParseLinks = value value = instance.AutoParseLinks
public boolean getAutoParseLinks() public void setAutoParseLinks(boolean value)
The document class supports automatic parsing of two types of links
Page links: These are links that are found in the original document and they contain a hot spot area that when clicked, invoke a target; usually, a jump to a different location or page in the document. These links have a value of DocumentLink.LinkType set to DocumentLinkType.TargetPage.
Hyperlinks: These are links that are found in the text of each page. The links are parsed when the text is first obtained and they contain the text bounding box, the value of the link (the text itself) and have a value of LinkType set to DocumentLinkType.Value.
The page links are parsed from the original document when DocumentStructure.Parse is called and the value of DocumentStructure.ParsePageLinks is set to true. Any links found are stored inside the page and can be retrieved using DocumentPage.GetLinks.
The hyperlinks are parsed the first time DocumentPage.GetText is called and the value of DocumentText.AutoParseLinks is set to true (the default value). The document object will use the regular expressions stored in LinkPatterns to find any matches in the text of the page with each match added as a link of type DocumentLinkType.Value to the page. These can also be retrieved with DocumentPage.GetLinks after GetText returns.
The link parsing is performed by calling DocumentPageText.ParseLinks on the DocumentPageText object for the page using the regular expressions stored in LinkPatterns.
If the value of AutoParseLinks is false then no automatic parsing for links will occur.
For an example, refer to GetLinks