PDFFlowDocument¶
Namespace: O2S.Components.PDF4NET.FlowDocument
Defines a PDF document that formats flow content.
Inheritance Object → PDFDocument → PDFFlowDocument
Constructors¶
PDFFlowDocument()¶
Initializes a new PDFFlowDocument object.
PDFFlowDocument(PDFFlowDocumentDefaults)¶
Initializes a new PDFFlowDocument object.
Parameters
documentDefaults PDFFlowDocumentDefaults
Default values for the document.
Properties¶
AfterPrintAction¶
Gets or sets the javascript action to execute after the document is printed.
Property Value
PDFJavaScriptAction
A PDFJavaScriptAction object
specifying the action to be executed after the document is printed.
AfterSaveAction¶
Gets or sets the javascript action to execute after the document is saved.
Property Value
PDFJavaScriptAction
A PDFJavaScriptAction object
specifying the action to be executed after the document is saved.
BeforeCloseAction¶
Gets or sets the javascript action to execute before the document is closed.
Property Value
PDFJavaScriptAction
A PDFJavaScriptAction object
specifying the action to be executed before the document is closed.
BeforePrintAction¶
Gets or sets the javascript action to execute before the document is printed.
Property Value
PDFJavaScriptAction
A PDFJavaScriptAction object
specifying the action to be executed before the document is printed.
BeforeSaveAction¶
Gets or sets the javascript action to execute before the document is saved.
Property Value
PDFJavaScriptAction
A PDFJavaScriptAction object
specifying the action to be executed before the document is saved.
CosDictionary¶
Gets the COS dictionary asssociated with this object.
Property Value
PDFCosDictionary
The internal COS dictionary.
Remarks
Incorrect manipulation of the information in the COS dictionary can lead to invalid PDF files.
DisplayMode¶
Gets or sets how the document should be displayed when opened in the viewer.
Property Value
PDFDisplayMode
A PDFDisplayMode enumeration member specifying how the viewer should display the document.
DocumentInformation¶
Gets or sets the document information.
Property Value
PDFDocumentInformation
The document's metadata.
DocumentSecurityStore¶
Gets or sets the document security store.
Property Value
PDFDocumentSecurityStore
A PDFDocumentSecurityStore object.
Remarks
The document security store includes relevant information for validating digital signatures.
It supports the ability to add this critical information after the signed document has been created and before this information is no longer available.
FileAttachments¶
Gets the list of file attachments embedded in this document.
Property Value
PDFDocumentFileAttachmentCollection
PDFDocumentFileAttachmentCollection object specifying the list
of document attachments.
Remarks
When a PDF file is imported into a PDFDocument object, this collection is populated automatically with the attachments in the file.
HeadersFooters¶
Gets the document headers and footers.
Property Value
PDFFlowDocumentHeadersFooters
The headers and footers defined in the document.
ID¶
Gets or sets the document ID.
Property Value
Byte[]
The PDF identifier of this document.
JavaScriptBlocks¶
Gets the JavaScript source code blocks.
Property Value
PDFJavaScriptBlockCollection
The collection of JavaScript source code block that are embedded in the document.
Language¶
Gets or sets the document language.
Property Value
String
A language identifier that shall specify the natural language for all text in the document except where overridden by language specifications for structure elements or marked content.
MarkInformation¶
Gets or sets the document mark information.
Property Value
PDFMarkInformation
A PDFMarkInformation object specifying whether the document conforms to Tagged PDF specification.
OpenAction¶
Gets or sets the action to execute when the document is opened.
Property Value
PDFAction
A PDFAction object specifying the action
to be executed when documents opens in the viewer.
Outline¶
Gets the document outline.
Property Value
PDFOutlineItemCollection
A tree-structured hierarchy of outline items.
OutputIntents¶
Gets or sets the collection of output intents.
Property Value
PDFOutputIntentCollection
A collection of PDFOutputIntent objects describing the color
characteristics of output devices on which the document might be rendered.
PageLabelingRanges¶
Gets the list of page labeling ranges in the PDF document.
Property Value
PDFPageLabelingRangeCollection
The list of page labeling ranges in the document.
PageLayout¶
Gets or sets the document's page layout specifying how the pages should be displayed when opened.
Property Value
PDFPageLayout
The document's page layout.
ParentStructureElementForContent¶
Gets or sets the structure element that serves as parent for the structure elements in the flow content objects.
Property Value
PDFStructureElement
A PDFStructureElement object representing the parent structure element for the flow content objects added to the document.
Remarks
By default the PDFFlowDocument create a PDFStandardStructureTypes.Part as parent for structure elements
defined by the flow content objects. This PDFStandardStructureTypes.Part element is a direct child of the
PDFStandardStructureTypes.Document structure element which represents the document and is the root of the structure tree.
The new parent applies only to flow content objects added to the document after this property has been set.
The structure element used as parent must be included explicitly in the document' structure tree.
PDFVersion¶
Gets or sets the PDF version of this PDFDocument object.
Property Value
PDFVersion
A PDFFlowDocument.PDFVersion enumeration member specifying the PDF version
of this PDFDocument object.
SecurityHandler¶
Gets the document security handler.
Property Value
PDFSecurityHandler
A PDFSecurityHandler that represents the handler used to encrypt the file loaded in this PDFDocument.
Remarks
Both RC4 and AES security handlers are supported.
StructureTree¶
Gets or sets the document structure tree.
Property Value
PDFStructureTree
The root of the document structure tree.
VersionExtension¶
Gets or sets the version extension.
Property Value
PDFVersionExtension
The extended PDF version this document implements.
ViewerPreferences¶
Gets or sets the document's viewer preferences.
Property Value
PDFViewerPreferences
The viewer preferences for displaying the document.
XmpMetadata¶
Gets or sets the XMP document metadata.
Property Value
PDFXmpMetadata
The XMP document metadata.
Methods¶
AddContent(PDFFlowContent)¶
Adds new content to the document.
Parameters
flowContent PDFFlowContent
New content to be added to the document.
Remarks
The content is laid out automatically in the available space and subsequent changes on the content have no effect.
AddSpace(Double)¶
Adds a space after the last flow content.
Parameters
height Double
The height of the space to add.
CloseCurrentPage()¶
Closes the current page no matter how much content has been added to it. Next content added to document will start on a new page.
GenerateTableOfContents()¶
Generates the document's table of contents.
GenerateTableOfContents(PDFFlowDocumentTOCSettings)¶
Generates the document's table of contents.
Parameters
tocSettings PDFFlowDocumentTOCSettings
Settings for generating the table of contents.
GetAvailableSpace()¶
Gets the available space on current page.
Returns
PDFSize
The available space on current page where the next flow content object will be placed.
GetFixedDocument()¶
Converts the flow document to a fixed document and returns it.
Returns
PDFFixedDocument
The fixed document that represents this document.
Save(Stream, PDFSecurityHandler, Boolean)¶
Saves the document to the specified stream.
Parameters
stream Stream
Destination stream.
securityHandler PDFSecurityHandler
Security handler for encrypting the saved file.
enableObjectCompression Boolean
When set to true, the structure of the PDF objects is also compressed. Supported when PDF version >= 1.5
StartNewPage()¶
Starts a new page no matter how much content has been added to current page.
Events¶
AfterContentDraw¶
Gets or sets the event that is fired after a flow content object is drawn on the page.
BeforeContentDraw¶
Gets or sets the event that is fired before a flow content object is drawn on the page.
PageCompleted¶
Gets or sets the event that is fired when a page has been completed and it can be closed for adding content.
PageCreated¶
Gets or sets the event that is fired when a new page has been created.