PDFDocument object

PDFDocument is one of the PDF Builder objects and is derived from PDFModel. It imports data from a DataWindow object, a DataWindowChild object or a DataStore object, or an existing PDF document to a new PDF document and saves the document.

To view the full hierarchy of the PDF Builder objects, find "pdfobject" in the Browser, right-click the object, and then select "Show Hierarchy” in the pop-up menu.

Properties

PDFDocument provides the following properties. In addition, it inherits the properties from its parent, PDFModel.

PDFDocument property

Datatype

Description

Attachment

PDFAttachment

Gets or sets the attachment of the PDF document.

BottomMargin

Double

Gets or sets the size of the bottom margin between the PDF document and the printed page.

ClassDefinition

PowerObject

An object of type PowerObject containing information about the class definition of the object or control.

CompressionLevel

Long

Gets or sets the compression level of the PDF document. There are 10 compression levels, 0 to 9, from no compression to the largest compression. 6 is the default value.

LeftMargin

Double

Gets or sets the size of the left margin between the PDF document and the printed page.

Properties

PDFDocumentProperties

Gets or sets the properties of the PDF document.

RightMargin

Double

Gets or sets the size of the right margin between the PDF document and the printed page.

Security

PDFSecurity

Gets or sets the security property of the PDF document.

TopMargin

Double

Gets or sets the size of the top margin between the PDF document and the printed page.

Watermark

PDFWatermark

Gets or sets the watermark of the PDF document.


Events

PDFDocument event

Occurs

Constructor

Immediately before the Open event occurs in the window.

Destructor

Immediately after the Close event occurs in the window.


Functions

PDFDocument provides the following functions.

PDFDocument function

Datatype returned

Description

AddPage

Long

Adds a page to an existing PDF document. The page is added to the end of the document.

ClassName

String

Returns the name assigned to the control.

Clone

PDFDocument

Clones the document.

GetBottomMargin

Double

Gets the bottom margin between the document and the bottom border of the page.

GetContextService

Integer

Creates a reference to a context-specific instance of the specified service.

GetLeftMargin

Double

Gets the margin between the document and the left border of the page.

GetPage

PDFPage

Gets the specified page in the document.

GetPageCount

Long

Gets the page count of the document.

GetParent

PowerObject

Returns a reference to the name of the parent object.

GetRightMargin

Double

Gets the margin between the document and the right border of the page.

GetTableOfContents

PDFTableOfContents

Gets the table of contents of the document.

GetTopMargin

Double

Gets the top margin between the document and the top border of the page.

ImportDataWindow

Long

Imports data from the DataWindow control, DataStore object, or DataWindowChild object to a PDF document.

ImportPDF

Long

Imports an existing PDF document to a new PDF document.

ImportPDFDocInformation

Long

Imports the documentation information of the specified PDF document.

ImportRichTextEdit

Long

Imports the content in the RichTextEdit control to the document.

IndexOf

Long

Gets the index of the specified page in the document.

InsertPage

Long

Inserts a page to the specified location in the document.

PostEvent

Boolean

Adds an event to the end of the message queue for the control.

RemovePage

Long

Removes a page from the document.

Save

Long

Saves the contents of a PDF document.

SearchObject

PDFModel

Searches for the specified object in the document.

SetBottomMargin

None

Sets the margin between the document and the bottom border of the page.

SetLeftMargin

None

Sets the margin between the document and the left border of the page.

SetRightMargin

None

Sets the margin between the document and the right border of the page.

SetTableOfContents

None

Sets the table of content for the document.

SetTopMargin

None

Sets the margin between the document and the top border of the page.

TriggerEvent

Integer

Triggers a specified event in the control and executes the script for the event.

TypeOf

Object

Returns the type of the control.