Document Solutions for Word
Report Templates / Template Configuration / Links
In This Topic
    Links
    In This Topic

    While using Report Templates in DsWord, you can also add hyperlinks to Word documents which can navigate to any specified web URL. 

    For example, consider a template layout for Document Solutions products which are added in a table.

    A Hyperlink is added to {{linkName}} field by clicking on 'Link' in 'Insert' tab and adding a template tag {{ds.linkURL}} (here ds is the name of data source), into the Address field as shown below:

    Consider the following sample data:

    JSON
    Copy Code
    [
      {
        "name": "Document Solutions for Word",
        "description": "DsWord is a part of Document Solutions that aims to be a complete solution to program and work with Word documents",
        "linkName": "Learn More",
        "linkURL": "https://developer.mescius.com/documents-api-word"
      },
      {
        "name": "Document Solutions for Imaging",
        "description": "DsImaging offers imaging API for image processing without using any external image editor.",
        "linkName": "Learn More",
        "linkURL": "https://developer.mescius.com/documents-api-imaging"
      },
      {
        "name": "Document Solutions for Pdf",
        "description": "Document Solutions for PDF handles majority of the PDF related needs as it conforms to a large part of Adobe PDF specification",
        "linkName": "Learn More",
        "linkURL": "https://developer.mescius.com/documents-api-word"
      },
      {
        "name": "Document Solutions for Excel, .NET",
        "description": "Document Solutions for Excel, .NET Edition is a new small-footprint, high-performance spreadsheet component that can be used in your server or desktop applications.",
        "linkName": "Learn More",
        "linkURL": "https://developer.mescius.com/documents-api-excel"
      },
      {
        "name": "Document Solutions for Excel, Java",
        "description": "DsExcel Java is a high-performance spreadsheet component that comes packaged with all the necessary features to help users handle complex spreadsheet challenges in an efficient way.",
        "linkName": "Learn More",
        "linkURL": "https://developer.mescius.com/documents-api-excel-java"
      }
    ]

    The below output is generated upon template processing which contains hyperlinks to corresponding web pages: 

    Note: DsWord supports using template documents containing malformed URI by rewriting them in a valid manner using MalformedUriRewriter property. To know more, refer Hyperlink.

    Limitation

    You can add {{ds.linkURL}} as a hyperlink address on a template tag (as explained above) but it is not allowed to specify any hyperlink inside a template tag.