<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Samples.Master" CodeBehind="table-of-contents.aspx.vb" Inherits="SelectPdf.Samples.table_of_contents" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>SelectPdf for .NET - Generate Table of Contents with Html to Pdf Converter - VB.NET / ASP.NET</title>
    <meta name="description" content="SelectPdf Generate Table of Contents automatically with Html to Pdf Converter Sample for VB.NET ASPNET. Pdf Library for .NET with full sample code in C# and VB.NET." itemprop="description">
    <meta name="keywords" content="table of contents, toc, pdf library, sample code, html to pdf, pdf converter" itemprop="keywords">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="mainContent" runat="server">
        <article class="post type-post status-publish format-standard hentry">
            <header class="entry-header">
                <h1 class="entry-title">SelectPdf for .NET - Generate Table of Contents with Html to Pdf Converter - VB.NET / ASP.NET Sample</h1>
            </header>
            <!-- .entry-header -->

            <div class="entry-content">
                <p>
                    This sample shows how the html to pdf converter can generate page numbers for a table of contents using SelectPdf Pdf Library for .NET.
                    The table of contents (TOC) must already exist at the top of the web page and the items from the table of contents must link to the appropriate sections from the document
                    (like in the test document below). The TOC elements must also have the following CSS classes or ID styles:
                    <br />
                    <br />
                    - all TOC elements (both titles from the actual table of contents, but also the link targets - where the user goes when clicking on a TOC link) 
                    must have a specific CSS class ("toc" in our example).
                    <br />
                    - all TOC titles must have similar IDs: TOC_Title{0} (<i>TOC_Title1</i> to <i>TOC_Title13</i> in our example).
                    <br />
                    - all TOC targets (document content) must have similar IDs: TOC_Target{0} (<i>TOC_Target1</i> to <i>TOC_Target13</i> in our example).
                    <br />
                    <br />
                    All these elements locations are retrieved during the conversion to PDF and those locations are used to get the content page numbers to display them in the 
                    table of contents. The font for the page numbers can be specified in code. Also, that style of the line that links the TOC titles with the page numbers.
                    <br />
                    <br />
                    <asp:HyperLink ID="LnkTest" runat="server" Text="Test document" Target="_blank"></asp:HyperLink>
                </p>
                <p>
                    Url:<br />
                    <asp:TextBox ID="TxtUrl" runat="server" Width="90%" Text="http://selectpdf.com"></asp:TextBox>
                    <br />
                    <br />
                    <asp:Button ID="BtnCreatePdf" runat="server" Text="Create PDF" OnClick="BtnCreatePdf_Click" CssClass="mybutton" />
                </p>
            </div>
            <!-- .entry-content -->
        </article>
        <!-- #post -->
</asp:Content>
