Extract Hyperlinks from Documents, Pages or Specific page Area via C#/VB.NET API

GroupDocs.Parser .NET API allows software developers to parse & extract hyperlinks from documents, pages or page Area of PDF, DOC, DOCX, PPT, PPTX, EML, MSG, XLS, XLSX, CSV, ODT, RTF, EPUB and many other documents.


Download Free Trial

How to Parse & Extract Hyperlinks from OTP documents via .NET API?

A hyperlink is a piece of text or an image or icon that points to an entire document or to a particular part within a document. The use of hyperlinks allows users to navigate to a web page or document. It is often required to extract hyperlinks from a document and use it to access external document or webpage. GroupDocs.Parser for .NET is a fascinating document text extraction API that provides complete functionality for implementing text and metadata extraction solutions. It supports text & hyperlinks extraction from PDF, Emails, Ebooks, Microsoft Office formats: Word (DOC, DOCX), PowerPoint (PPT, PPTX), Excel (XLS, XLSX), LibreOffice formats and many more. It supports several advanced features for documents parsing, extracting plain and structured text, text searching by keywords, extract metadata or images, containers as well as attachments and many more.

Extract hyperlinks from OTP in .NET

GroupDocs.Parser for .NET makes it easy for C# developers to extract hyperlinks from a OTP file by implementing a few easy steps.

  • Instantiate Parser object for the initial document;
  • Check if the document supports hyperlink extraction;
  • Call GetHyperlinks method and obtain collection of PageHyperlinkArea objects;
  • Iterate through the collection and get a hyperlink text and URL.

How to extract hyperlinks from OTP file using C# example code

// Extract hyperlinks from OTP file using GroupDocs.Parser API
// Create an instance of Parser class
using (Parser parser = new Parser(filePath)) {
    // Check if the document supports hyperlink extraction
    if (!parser.Features.Hyperlinks) {
        Console.WriteLine("Document isn't supports hyperlink extraction.");
        return;
    }
    // Extract hyperlinks from the document
    IEnumerable<PageHyperlinkArea> hyperlinks = parser.GetHyperlinks();
    // Iterate over hyperlinks
    foreach (PageHyperlinkArea h in hyperlinks) {
        // Print the hyperlink text
        Console.WriteLine(h.Text);
        // Print the hyperlink URL
        Console.WriteLine(h.Url);
        Console.WriteLine();
    }
}

System Requirements

GroupDocs.Parser for .NET APIs are supported on all major platforms and operating systems. Before executing the code below, please make sure that you have the following prerequisites installed on your system.

  • Operating Systems: Microsoft Windows, Linux, MacOS
  • Development Environments: Microsoft Visual Studio, Xamarin, MonoDevelop
  • Frameworks
  • Download the latest version of GroupDocs.Parser for .NET from Nuget

Why Use GroupDocs.Parser for .NET

  • Plain text extraction support from any supported documents
  • Documents parsing via user-defined templates
  • Fully support structured text extraction
  • Text searching via keyword as well as regular expression
  • Extract formatted text, metadata, images, containers, and attachments
  • Extract table of contents for some supported document formats
  • Parse form data from PDF documents
  • Extract hyperlinks from the document

Extract Hyperlinks From Other Document Formats

.NET documents parse & hyperlinks extraction API for file formats and images. Extract data for some of the popular file formats as stated below.

PDF

(Portable Document Format)

PPS

(PowerPoint Slide Show)

PPSX

(PowerPoint Slide Show)

PPT

(Microsoft PowerPoint 97-2003)

PPTX

(Open XML presentation Format)

RTF

(Rich Text Format)

TEX

(LaTeX Source Document)

VDX

(The 7th Guest Video File)

VSDM

(Visio Macro-Enabled Drawing)

VSDX

(Visio Drawing)

VSSM

(Visio Macro-Enabled Stencil File)

VSSX

(Visio Stencil File)

VSTM

(Visio Macro-Enabled Drawing Template)

VSTX

(Visio Drawing Template)

VSX

(Visio Stencil XML File)

VTX

(Anim8or 3D Model)

Back to top
 English