Skip to main content

OutlineList

Version: 6.0

cete.dynamicpdf.outlinelist

OutlineList​

Represents a collection of outlines.

public class OutlineList : IEnumerable
Public Class OutlineList
Implements IEnumerable

Inheritance: Object → OutlineList

Implements: IEnumerable

Licensing​

This class is a DynamicPDF Generator Professional Edition feature. One of the following licenses is required for non-evaluation usage:

  • DynamicPDF Generator for .NET Professional Edition
  • DynamicPDF Generator for .NET Enterprise Edition
  • DynamicPDF Merger for .NET Professional Edition
  • DynamicPDF Merger for .NET Enterprise Edition
  • DynamicPDF ReportWriter for .NET Professional Edition
  • DynamicPDF ReportWriter for .NET Enterprise Edition
  • DynamicPDF Core Suite for .NET Professional Edition
  • DynamicPDF Core Suite for .NET Enterprise Edition

Examples​

This example shows how to create an outline for a PDF document.

Imports System
Imports ceTe.DynamicPDF

Module MyModule Sub Main() ' Create a PDF Document Dim MyDocument As Document = New Document
' Add three blank pages MyDocument.Pages.Add(New Page(PageSize.Letter)) MyDocument.Pages.Add(New Page(PageSize.Letter)) MyDocument.Pages.Add(New Page(PageSize.Letter))
' Add a top level outline and set properties Dim MyOutline1 As Outline = MyDocument.Outlines.Add("Outline1") MyOutline1.Style = TextStyle.Bold MyOutline1.Color = New RgbColor(255, 0, 0)
' Add child outlines Dim MyOutline1A As Outline = MyOutline1.Outlines.Add("Outline1A", New ZoomDestination(2, PageZoom.FitPage)) MyOutline1A.Expanded = False Dim MyOutline1A1 As Outline = MyOutline1A.Outlines.Add("Outline1A1", New XYDestination(2, 0, 0)) Dim MyOutline1A2 As Outline = MyOutline1A.Outlines.Add("Outline1A2", New ZoomDestination(2, PageZoom.FitHeight)) Dim MyOutline1B As Outline = MyOutline1.Outlines.Add("Outline1B", New ZoomDestination(2, PageZoom.FitWidth)) ' Add a second top level outline Dim MyOutline2 As Outline = MyDocument.Outlines.Add("Outline2", New XYDestination(3, 0, 300)) ' Add a child outline Dim MyOutline2A As Outline = MyOutline2.Outlines.Add("Outline2A") ' Save the PDF document MyDocument.Draw("C:\MyDocument.pdf") End Sub
End Module
using System;
using ceTe.DynamicPDF;

class MyClass
{static void Main(){ // 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( 255, 0, 0 ); // Add child outlines Outline outline1A = outline1.Outlines.Add( "Outline1A", new ZoomDestination( 2, PageZoom.FitPage ) ); outline1A.Expanded = false; Outline outline1A1 = outline1A.Outlines.Add( "Outline1A1", new XYDestination( 2, 0, 0 ) ); Outline outline1A2 = outline1A.Outlines.Add( "Outline1A2", new ZoomDestination( 2, PageZoom.FitHeight ) ); Outline outline1B = outline1.Outlines.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.Outlines.Add( "Outline2A" ); // Save the PDF document document.Draw( @"C:\MyDocument.pdf" );}
}

Remarks​

See the Outlines and Bookmarks topic for more on Outlines.

Properties​

Count​

Gets the number of outlines in the list.

public int Count { get; }
Public Property Count As Int32

Property Value​

Int32

Item[Int32]​

Gets the Outline object at the specified index.

public Outline this[int index] { get; }
Public Property Item(index As Integer) As Outline

Property Value​

Outline

Methods​

Add(PdfOutline)​

Adds an imported outline along with its children to the outline list.

public Outline Add(PdfOutline outline)
Function Add(outline As PdfOutline) As Outline

Parameters​

Imported outline to add.

Returns​

The Outline object that is created.

Licensing​

This method is a DynamicPDF Merger Standard Edition feature. One of the following licenses is required for non-evaluation usage:

  • DynamicPDF Merger for .NET Standard Edition
  • DynamicPDF Merger for .NET Professional Edition
  • DynamicPDF Merger for .NET Enterprise Edition
  • DynamicPDF Core Suite for .NET Professional Edition
  • DynamicPDF Core Suite for .NET Enterprise Edition

Remarks​

Use the overloaded method with a the addChildOutline parameter set to false if you do not want to add the child outlines.

Add(PdfOutline, Boolean)​

Adds an imported outline to the outline list.

public Outline Add(PdfOutline outline, bool addChildOutline)
Function Add(outline As PdfOutline, addChildOutline As Boolean) As Outline

Parameters​

Imported outline to add.

Specifies if the child outlines should be added as well.

Returns​

The Outline object that is created.

Licensing​

This method is a DynamicPDF Merger Standard Edition feature. One of the following licenses is required for non-evaluation usage:

  • DynamicPDF Merger for .NET Standard Edition
  • DynamicPDF Merger for .NET Professional Edition
  • DynamicPDF Merger for .NET Enterprise Edition
  • DynamicPDF Core Suite for .NET Professional Edition
  • DynamicPDF Core Suite for .NET Enterprise Edition

Add(PdfOutlineList)​

Adds all outlines from an imported outline list to the outline list.

public void Add(PdfOutlineList outlines)
Sub Add(outlines As PdfOutlineList)

Parameters​

Imported outline list to add.

Licensing​

This method is a DynamicPDF Merger Standard Edition feature. One of the following licenses is required for non-evaluation usage:

  • DynamicPDF Merger for .NET Standard Edition
  • DynamicPDF Merger for .NET Professional Edition
  • DynamicPDF Merger for .NET Enterprise Edition
  • DynamicPDF Core Suite for .NET Professional Edition
  • DynamicPDF Core Suite for .NET Enterprise Edition

Add(String)​

Adds an Outline object to the outline list.

public Outline Add(string text)
Function Add(text As String) As Outline

Parameters​

Text of the outline.

Returns​

The Outline object that is created.

Add(String, Action)​

Adds an Outline object to the outline list.

public Outline Add(string text, Action action)
Function Add(text As String, action As Action) As Outline

Parameters​

Text of the outline.

Action or destination of the outline.

Returns​

The Outline object that is created.

Equals(Object)​

Determines whether the specified Object is equal to the current Object . (Inherited from Object)

public bool Equals(Object obj)
Function Equals(obj As Object) As Boolean

Parameters​

The Object to compare with the current Object .

Returns​

true if the specified Object is equal to the current Object ; otherwise, false.

GetEnumerator()​

Returns an enumerator that can iterate through the OutlineList .

public IEnumerator GetEnumerator()
Function GetEnumerator() As IEnumerator

Returns​

An IEnumerator for the entire OutlineList

GetHashCode()​

Serves as a hash function for a particular type. (Inherited from Object)

public int GetHashCode()
Function GetHashCode() As Integer

Returns​

A hash code for the current Object .

GetType()​

Gets the Type of the current instance. (Inherited from Object)

public Type GetType()
Function GetType() As Type

Returns​

The Type instance that represents the exact runtime type of the current instance.

ToString()​

Returns a String that represents the current Object . (Inherited from Object)

public string ToString()
Function ToString() As String

Returns​

A String that represents the current Object .

See Also​

ceTe.DynamicPDF