Convert from HTML to PDF in ASP.NET Core with a Free 3rd Party Library

Html to Pdf Conversion is now available for .NET Core. SelectPdf offers a Community Edition (FREE) of the powerful Html To Pdf Converter for .NET Core that can be found in the full featured pdf library.

C# (1.6 MB)
 
 
 
 
 
4.3 Star
(4)
2,050 times
Add to favorites
5/10/2019
E-mail Twitter del.icio.us Digg Facebook

Solution explorer

C#
<html>
    <head>
        <title>Test document for SelectPdf Samples</title>
    </head>
    <body>
        <h1>Table of Contents</h1>
        <p>
            <a href="#main1">Internal link to Main title 1</a><br />
            <a href="#main2">Internal link to Main title 2</a><br />
            <a href="https://selectpdf.com" target="_blank">External link to selectpdf.com</a><br />
            <a href="https://www.google.com" target="_blank">External link to google.com</a><br />
        </p>
        <a id="main1"></a>
        <h1>Main title 1</h1>
        <h2>Sub title 1.1</h2>
        <p>
            Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. 
            Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. 
            Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. 
            Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. 
            <br />
            <br />
            Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. 
            Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. 
            Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. 
            Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. 
            Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. 
            Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. 
            Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. 
            Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. 
            <br />
            <br />
            Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. 
            Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. 
            Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. 
            Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. Paragraph 1.1. 
        </p>
        <h2>Sub title 1.2</h2>
        <p>
            Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. 
            Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. 
            Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. 
            Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. 
            <br />
            <br />
            Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. 
            Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. 
            Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. 
            Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. 
            Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. 
            Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. 
            Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. 
            Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. 
            <br />
            <br />
            Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. 
            Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. 
            Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. 
            Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. Paragraph 1.2. 
        </p>
        <h2>Sub title 1.3</h2>
        <p>
            Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. 
            Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. 
            Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. 
            Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. 
            <br />
            <br />
            Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. 
            Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. 
            Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. 
            Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. 
            Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. 
            Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. 
            Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. 
            Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. 
            <br />
            <br />
            Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. 
            Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. 
            Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. 
            Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. Paragraph 1.3. 
        </p>

        <a id="main2"></a>
        <h1>Main title 2</h1>
        <h2>Sub title 2.1</h2>
        <p>
            Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. 
            Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. 
            Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. 
            Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. 
            <br />
            <br />
            Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. 
            Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. 
            Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. 
            Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. 
            Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. 
            Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. 
            Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. 
            Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. 
            <br />
            <br />
            Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. 
            Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. 
            Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. 
            Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. Paragraph 2.1. 
        </p>
        <h2>Sub title 2.2</h2>
        <p>
            Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. 
            Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. 
            Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. 
            Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. 
            <br />
            <br />
            Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. 
            Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. 
            Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. 
            Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. 
            Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. 
            Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. 
            Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. 
            Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. 
            <br />
            <br />
            Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. 
            Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. 
            Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. 
            Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. Paragraph 2.2. 
        </p>
        <h2>Sub title 2.3</h2>
        <p>
            Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. 
            Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. 
            Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. 
            Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. 
            <br />
            <br />
            Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. 
            Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. 
            Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. 
            Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. 
            Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. 
            Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. 
            Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. 
            Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. 
            <br />
            <br />
            Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. 
            Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. 
            Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. 
            Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. Paragraph 2.3. 
        </p>
    </body>
</html>