Show / Hide Table of Contents

# Class FlowDocument

The class FlowDocument. Encapsulates document creation API.

##### Inheritance

object
FlowDocument

##### Implements

IDisposable

##### Inherited Members

object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

###### Namespace: pdftron.Layout

###### Assembly: PDFNet.dll

##### Syntax

    public class FlowDocument : IDisposable

### Constructors

#### FlowDocument()

##### Declaration

    public FlowDocument()

### Methods

#### AddList()

Add a list the document

##### Declaration

    public List AddList()

##### Returns

Type | Description
--- | ---
List | The list object that was added

#### AddParagraph()

Add an empty paragraph to the document

##### Declaration

    public Paragraph AddParagraph()

##### Returns

Type | Description
--- | ---
Paragraph | The paragraph object that was added

#### AddParagraph(string)

Add an paragraph with text to the document

##### Declaration

    public Paragraph AddParagraph(string text)

##### Parameters

Type | Name | Description
--- | --- | ---
string | text | The text to add

##### Returns

Type | Description
--- | ---
Paragraph | The paragraph object that was added

#### AddTable()

Add a table the document

##### Declaration

    public Table AddTable()

##### Returns

Type | Description
--- | ---
Table | The table object that was added

#### Dispose()

##### Declaration

    public override sealed void Dispose()

#### Dispose(bool)

##### Declaration

    [HandleProcessCorruptedStateExceptions]
    protected virtual void Dispose(bool A_0)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | A_0 |

#### ~FlowDocument()

##### Declaration

    protected ~FlowDocument()

#### GetBody()

Gets the body of the document. The body is the root of the content tree. It can be used to traverse the content tree via the ContentNodeIterator object.

##### Declaration

    public ContentNode GetBody()

##### Returns

Type | Description
--- | ---
ContentNode | The body of the document

#### PaginateToPDF()

Paginates the content tree into a PDFDoc object

##### Declaration

    public PDFDoc PaginateToPDF()

##### Returns

Type | Description
--- | ---
PDFDoc | The PDFDoc object

#### SetDefaultMargins(double, double, double, double)

Set the default margins for the document

##### Declaration

    public void SetDefaultMargins(double left_points, double top_points, double right_points, double bottom_points)

##### Parameters

Type | Name | Description
--- | --- | ---
double | left_points | The left margin in points
double | top_points | The top margin in points
double | right_points | The right margin in points
double | bottom_points | The bottom margin in points

#### SetDefaultPageSize(double, double)

Set the default page size for the document

##### Declaration

    public void SetDefaultPageSize(double width_points, double height_points)

##### Parameters

Type | Name | Description
--- | --- | ---
double | width_points | The width in points
double | height_points | The height in points

### Implements

IDisposable