PDF.SetProperties

PDF.SetProperties (

string ObjectName,

table Properties )

Description

Sets the properties of a PDF object.

Parameters

ObjectName

(string) The name of the PDF object.

Properties

(table) A table containing the PDF object's properties indexed by the following keys:

KEY

TYPE

DESCRIPTION

File

string

The PDF File (*.pdf) to load.

ShowScrollbars

boolean

True if the object should show vertical and horizontal scrollbars, false if it should not.

ShowToolbar

boolean

True if the object should show a toolbar, false if it should not.

ShowBorder

boolean

True if the object should show a border, false if it should not.

Layout

string

The layout mode to set for the page:

CONSTANT

VALUE

DESCRIPTION

LAYOUT_USER_PREF

"DontCare"

Use the current user preference.

LAYOUT_SINGLE_PAGE

"SinglePage"

Show a single page.

LAYOUT_ONE_COLUMN

"OneColumn"

Show one column in continuous mode.

LAYOUT_TWO_COLUMN_L

"TwoColumnLeft"

Show two columns in continuous mode with first page on the left.

LAYOUT_TWO_COLUMN_R

"TwoColumnRight"

Show two columns in continuous mode with first page on right.

Page

string

The page mode to set for the object:

CONSTANT

VALUE

DESCRIPTION

PAGE_STANDARD

"none"

Show document, no bookmarks or thumbnails.

PAGE_BOOKMARKS

"bookmarks"

Show document and bookmarks.

PAGE_THUMBS

"thumbs"

Show document and thumbnails.

View

string

The view of the page to set within the object:

CONSTANT

VALUE

DESCRIPTION

VIEW_PAGE

"Fit"

Fit entire page, both vertically and horizontally.

VIEW_WIDTH

"FitH"

Fit the width of the page.

VIEW_HEIGHT

"FitV"

Fit the height of the page.

VIEW_BOUNDING

"FitB"

Fit the bounding box (visible text area) both vertically and horizontally.

VIEW_BOUNDING_WIDTH

"FitBH"

Fit the width of the bounding box (visible text area).

VIEW_BOUNDING_HEIGHT

"FitBV"

Fit the height of the bounding box (visible text area).

VIEW_ACTUAL_SIZE

"ActualSize"

Show the document at its actual size (100% magnification).

ViewOffset

number

The horizontal (left), or vertical (top) offset to set based on the View setting.

Enabled

boolean

True if the PDF object should be enabled, false if it should not be.

Visible

boolean

True if the PDF object should be visible, false if it should not be.

X

number

The horizontal position (in pixels) of the top left corner of the PDF object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has an X value of 0

Y

number

The vertical position (in pixels) of the top left corner of the PDF object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has a Y value of 0

Width

number

The width (in pixels) of the PDF object.

Height

number

The height (in pixels) of the PDF object.

ResizeLeft

boolean

True if the left side of the object should move when the application is resized, false if it should not.

ResizeRight

boolean

True if the right side of the object should move when the application is resized, false if it should not.

ResizeTop

boolean

True if the top of the object should move when the application is resized, false if it should not.

ResizeBottom

boolean

True if the bottom of the object should move when the application is resized, false if it should not.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.

See also: Related Actions