You are here: Function Reference > Alphabetical Listing > P > PageInfo

PageInfo

Use this function to get information about the page of a form you specify. This information includes height, width, and orientation.

Syntax

PageInfo (Prefix, Page, Recipient, Section, Form, Group)

Parameter

Description:

Prefix

This parameter identifies a prefix for creating the variable names to contain the page information.

Page

(Optional) This parameter determines the relative page number that should be examined, once the starting page is located by examining the remaining parameters. The default is the first page located.

Recipient

(Optional) This parameter names a specific recipient that must be used on a section of the page located. If you omit this parameter, the function matches the first page identified by the remaining search criteria.

Section

(Optional) This parameter names a section that should be found to identify the page.

Form

(Optional) This parameter names a form that contains the page to be found.

Group

(Optional) This parameter names a group that must contain the page to be found.

The Section, Form, and Group parameters are optional and when used will work together to locate the starting page for the search. Here are some examples:

Once the requested page is located, the system assigns the page information to DAL variables using the Prefix parameter. If these variables do not exist in DAL, the system creates them for you. The system creates four internal variables: prefix.height, prefix.width, prefix.landscape, and prefix.paper. If these variables exist, the system modifies them with the new information.

For example, a call like this will create four variables.

PageInfo("MYPAGE");

Variable

Description

MYPAGE.Height

Contains the height of the page in FAP units (2400 DPI).

MYPAGE.Width

Contains the width of the page in FAP units (2400 DPI).

MYPAGE.Landscape

Contains one (1) if the page is landscape, otherwise zero (0).

MYPAGE.Paper

Contains a value that corresponds to a paper size table entry.

Note that for landscape pages, the height and width values reflect the rotation of the width and height. For instance, non-landscape letter documents return a height of 26400 and a width of 20400. Landscape letter documents return a height of 20400 and a width of 26400.

The page size (height and width) is determined by finding the first section on a page with the required recipient. If no recipient is specified, the first section on the page is used. The form pages within a document do not have to be the same size. Also note that if the first section on a page is a custom size, the width and height will reflect the best values.

Generally when a section is a custom size, the actual page size is found in the form definition. If, however, the form size (height or width) is smaller than the corresponding section size, then the larger of the values is returned.

Also remember since page size is determined by the first section designated for a given recipient, it is possible for the same page to have a different size for different recipients.

The PageInfo function returns a value if used in an expression that requires it. The possible return values are zero (0) if the requested page could not be found, or non-zero if the page is found.

Possible reasons for a page not to be located include:

See also