Document.Outlines Property

Gets an OutlineList object that represents the top level outlines of the Document .

public OutlineList Outlines { get; }
Public Property Outlines As OutlineList

Property Value

OutlineList

Licensing Info

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Examples

This example shows how to create an outline for a PDF document.
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Html
     
Module MyModule
     
    Sub Main()

	   'Create a PDF Document
        Dim document As Document = New Document
        ' Add three blank pages
        document.Pages.Add(New Page(PageSize.Letter))
        document.Pages.Add(New Page(PageSize.Letter))
        document.Pages.Add(New Page(PageSize.Letter))

        'Add a top level outline and set properties
        Dim outline1 As Outline = document.Outlines.Add("Outline1")
        outline1.Style = TextStyle.Bold
        outline1.Color = New RgbColor(1.0F, 0.0F, 0.0F)

        'Add child outlines
        Dim outline1A As Outline = outline1.ChildOutlines.Add("Outline1A", New ZoomDestination(2, PageZoom.FitPage))
        outline1A.Expanded = False
        Dim outline1A1 As Outline = outline1A.ChildOutlines.Add("Outline1A1", New XYDestination(2, 0, 0))
        Dim outline1A2 As Outline = outline1A.ChildOutlines.Add("Outline1A2", New ZoomDestination(2, PageZoom.FitHeight))
        Dim outline1B As Outline = outline1.ChildOutlines.Add("Outline1B", New ZoomDestination(2, PageZoom.FitWidth))

        'Add a second top level outline
        Dim outline2 As Outline = document.Outlines.Add("Outline2", New XYDestination(3, 0, 300))

        'Add a child outline
        Dim outline2A As Outline = outline2.ChildOutlines.Add("Outline2A")

        ' Save the PDF document
        document.Draw(outputPath)
    End Sub
End Module
using System;
using ceTe.DynamicPDF;	

public class Example 
{
    public static void CreatePDF(string outputPath)
    {
        // Create a PDF Document
        Document document = new Document();

        // Add three blank pages
        document.Pages.Add(new Page(PageSize.Letter));
        document.Pages.Add(new Page(PageSize.Letter));
        document.Pages.Add(new Page(PageSize.Letter));

        // Add a top level outline and set properties
        Outline outline1 = document.Outlines.Add("Outline1");
        outline1.Style = TextStyle.Bold;
        outline1.Color = new RgbColor(1.0f, 0.0f, 0.0f);

        // Add child outlines
        Outline outline1A = outline1.ChildOutlines.Add("Outline1A", new ZoomDestination(2, PageZoom.FitPage));
        outline1A.Expanded = false;
        Outline outline1A1 = outline1A.ChildOutlines.Add("Outline1A1", new XYDestination(2, 0, 0));
        Outline outline1A2 = outline1A.ChildOutlines.Add("Outline1A2", new ZoomDestination(2, PageZoom.FitHeight));
        Outline outline1B = outline1.ChildOutlines.Add("Outline1B", new ZoomDestination(2, PageZoom.FitWidth));

        // Add a second top level outline
        Outline outline2 = document.Outlines.Add("Outline2", new XYDestination(3, 0, 300));

        // Add a child outline
        Outline outline2A = outline2.ChildOutlines.Add("Outline2A");

        // Save the PDF document
        document.Draw(outputPath);
    }
}

Remarks

See the Outlines and Bookmarks topic for more on Outlines.

See Also

Document
ceTe.DynamicPDF

In this topic