| java.lang.Object | ||||
| ↳ | com.pdftron.layout.ContentElement | |||
| ↳ | com.pdftron.layout.ContentNode | |||
| ↳ | com.pdftron.layout.ContentContainer | |||
| ↳ | com.pdftron.layout.FlowDocument | |||
The class FlowDocument. Encapsulates document creation API.
A FlowDocument is a content container: paragraphs, tables and lists added to it are added to the current (last) section of the document.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
FlowDocument()
Creates an empty document containing a single section.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Section |
addSection()
Adds a new section at the end of the document and makes it the current
section.
| ||||||||||
| void |
close()
Frees the native memory of the object.
| ||||||||||
| void |
destroy()
Frees the native memory of the object.
| ||||||||||
| Section |
getCurrentSection()
Gets the current section, i.e.
| ||||||||||
| int | getNumSections() | ||||||||||
| Section |
getSection(int index)
Gets the section at the given index.
| ||||||||||
| PDFDoc |
paginateToPDF()
Paginates the content tree into a PDFDoc object.
| ||||||||||
| void |
setDefaultMargins(double leftPoints, double topPoints, double rightPoints, double bottomPoints)
Set the default margins for the document.
| ||||||||||
| void |
setDefaultPageSize(double widthPoints, double heightPoints)
Set the default page size for the document.
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.pdftron.layout.ContentContainer
| |||||||||||
From class
com.pdftron.layout.ContentNode
| |||||||||||
From class
com.pdftron.layout.ContentElement
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
java.lang.AutoCloseable
| |||||||||||
Creates an empty document containing a single section.
| PDFNetException |
|---|
Adds a new section at the end of the document and makes it the current section.
The content of the new section starts on a new page. Content added directly to the FlowDocument afterwards is added to the newly created section.
| PDFNetException |
|---|
Frees the native memory of the object. This can be explicity called to control the deallocation of native memory and avoid situations where the garbage collector does not free the object in a timely manner.
| PDFNetException |
|---|
Frees the native memory of the object. This can be explicitly called to control the deallocation of native memory and avoid situations where the garbage collector does not free the object in a timely manner.
| PDFNetException |
|---|
Gets the current section, i.e. the section that content added directly to the FlowDocument goes into.
| PDFNetException |
|---|
Gets the section at the given index.
| index | The zero based index of the section |
|---|
| PDFNetException |
|---|
Set the default margins for the document.
| leftPoints | The left margin in points |
|---|---|
| topPoints | The top margin in points |
| rightPoints | The right margin in points |
| bottomPoints | The bottom margin in points |
| PDFNetException |
|---|
Set the default page size for the document.
| widthPoints | The width in points |
|---|---|
| heightPoints | The height in points |
| PDFNetException |
|---|