The page Object

This table lists the methods provided by the page object:

Method

Return

Parameters

Description

add_background_image

bool: true on success, false on error

file_name (string): the name of the image file.

x_pos (real): the horizontal coordinate of the upper left corner.

y_pos (real): the vertical coordinate of the upper left corner.

width (real): the width of the image.

height (real): the height of the image.

Adds an image behind the page text.

add_databox_text

bool: true on success, false on failure

pg_text (string): text to add to the databox.

dbox (databox): the databox to which CPF should add the text.

txt_matrix (matrix): the matrix to apply to the databox.

Adds left-aligned text to the page in the specified databox.

add_databox_text_center

bool: true on success, false on failure

pg_text (string): text to add to the databox.

dbox (databox): the databox to which CPF should add the text.

txt_matrix (matrix): the matrix to apply to the databox.

Adds center-aligned text to the page in the specified databox.

add_databox_text_right

bool: true on success, false on failure

pg_text (string): text to add to the databox.

dbox (databox): the databox to which CPF should add the text.

txt_matrix (matrix): the matrix to apply to the databox.

Adds right-aligned text to the page in the specified databox.

add_foreground_image

bool: true on success, false on error

file_name (string): the name of the image file.

x_pos (real): the horizontal coordinate of the upper left corner.

y_pos (real): the vertical coordinate of the upper left corner.

width (real): the width of the image.

height (real): the height of the image.

Adds an image in front of the page text.

add_form

bool: true on success, false on error

fm_add (form): the form to add to the page.

fm_matrix (matrix): the matrix to apply to the form.

Adds a form to the page.

add_image

bool: true on success, false on error

img (image): the image to add to the page.

x_pos (real): the horizontal coordinate of the upper left corner.

y_pos (real): the vertical coordinate of the upper left corner.

Adds an image to the page.

add_image_to_box

bool: true on success, false on error

dbox (databox): the databox to which you want to add the image.

img (image): the image to add to the page.

img_matrix (matrix): the matrix to apply to the image.

Adds an image to a databox on the page.

add_output_bin

bool: true on success, false on failure

bin_name (string): the name of the output bin.

Adds an output bin name to a document page.

add_page_contents

bool: true on success, false on error

dbox (databox): the databox to which you want to add the contents.

pg_content (page_content): the contents to add to the databox.

pg_matrix (matrix): the matrix to apply to the databox.

Adds contents to the specified databox on the page.

add_page_variable

bool: true on success, false on error

pg_var (string): the name of the variable to add.

value (string): the value of the page variable.

Adds a page variable with the specified value to the page.

add_stickynotes_to_existing_page

bool: true on success, false on error

stickynote array (array): an array of the sticky notes that will be added to this page in the DocuVault.

Adds the sticky notes to this page in the DocuVault.

count (int): number of sticky notes in the array that are to be set onto this page.

add_uri bool: true on success, false on error

(string): the URI text.

dbox(databox): the databox to emit the URI to.

(real): the line width of the surrounding rectangle.

Emits a URI string to the page at the location of the specified databox. A surrounding rectangle is drawn with the specified line width.
add_uri bool: true on success, false on error

(string): the URI text.

(real): the horizontal value of the upper left corner of the uri field on the page.

(real): the vertical value of the upper left corner of the uri field on the page.

(real): the horizontal value of the lower right corner of the uri field on the page.

(real): the vertical value of the lower right corner of the uri field on the page.

(real): the line width of the surrounding rectangle.

Emits a URI string to the page at the specified location. A surrounding rectangle is drawn with the specified line width.

change_stock

bool: true on success, false on error

DocuVault (string): the name of the DocuVault that stores the stock.

pg_stock (string): the name of the new page stock.

Changes the page’s stock to the specified stock.

clear_stickynotes_from_
existing_page

bool: true on success, false on error

none

Deletes all sticky notes from this page in the DocuVault.

clone

page: the clone of the page

none

Creates a clone of the page.

create_blank_page

bool: true on success, false on failure

DocuVault (string): the name of the DocuVault that stores the stock.

pg_stock (string): the name of the new page stock.

view_orn (enum): the view orientation of the new page.

Builds a blank page without using a template page.

data_index_for_new_doc

bool: true on success, false on failure

name (string): the name of the index to set.

Indexes all pages in the new document with the specified text index.

value (string): the value of the specified index.

data_index_page

bool: true on success, false on failure

doc (document): the document to which this page is indexed.

Indexes the specified page in the document with the specified text index.

name (string): the name of the index to set.

value (string): the value of the specified index.

delete_page_variable

bool: true on success, false on error

pg_var (string): the page variable to remove.

Removes a page variable from the page.

dtm_index_for_new_doc

bool: true on success, false on failure

name (string): the name of the index to set.

Indexes all pages in the new document with the specified date/time index.

value (tstamp): the value of the specified index.

dtm_index_page

bool: true on success, false on failure

doc (document): the document to which this page is indexed.

Indexes the specified page in the document with the specified date/time index.

name (string): the name of the index to set.

value (tstamp): the value of the specified index.

dtm_index_page_text

bool: true on success, false on failure

doc (document): the document to which this page is indexed

Indexes the given page in the document with the specified date/time index using the specified template.

name (string): the name of the index to set.

value (string): the value of the specified index.

template (string): the template to use to format the value.

dtm_index_text_for_new_doc

bool: true on success, false on error

name (string): the name of the index to set.

Indexes all pages in the new document with the specified date/time index using the specified template.

value (string): the value of the specified index.

template (string): the template to use to format the value.

enum_page_dtm_indexes

bool: true on success, false on error

inx_names (string array): the names of the custom date/time indexes.

inx_values (tstamp array): the values of the custom date/time indexes.

inx_count (int): the number of custom date/time indexes.

Enumerates the page’s custom date/time indexes.

enum_page_num_indexes

bool: true on success, false on error

inx_names (string array): the names of the custom numeric indexes.

inx_values (real array): the values of the custom numeric indexes.

inx_count (int): the number of custom numeric indexes.

Enumerates the page’s custom numeric indexes.

enum_page_text_indexes

bool: true on success, false on error

inx_names (string array): the names of the custom text indexes.

inx_values (string array): the values of the custom text indexes.

inx_count (int): the number of custom text indexes.

Enumerates the page’s custom text indexes.

enum_page_variables

bool: true on success, false on error

var_names (string array): the names of the page variables.

var_values (string array): the values of the page variables.

count (int): the number of page variables returned.

Enumerates the page variables on this page.

exclude_contents_inside_box

bool: true on success, false on error

dbox (databox): the databox whose contents you want to remove from the page.

Removes the contents of a particular databox from the page.

exclude_contents_inside_list

bool: true on success, false on error

dbox_list (databox_list): the databoxes whose contents you want to remove from the page.

Removes the contents of particular databoxes from the page.

exclude_contents_outside_box

bool: true on success, false on error

dbox (databox): the databox whose contents you want to retain on the page.

Removes all text except the contents of a particular databox from the page.

exclude_contents_outside_list

bool: true on success, false on error

dbox_list (databox_list): the list of databoxes whose contents you want to retain on the page.

Removes all text except the contents of particular databoxes from the page.

export_to_file

bool: true on success, false on error

file_name (string): the name of the file to create.

type (enum): an integer indicating the format of the external file.

img_res (int): the image resolution if the document is a TIFF file.

Exports this page to an external file.

export_to_pdf

bool: true on success, false on error

file_name (string): the name of the file to create.

dialect (string): the dialects required to process the PDF file.

Exports this page to a PDF file.

get_contents_inside_box

bool: true on success, false on error

dbox (databox): the databox whose contents you want to extract.

pg_content (page_content): the contents of the databox.

Retrieves the contents of a databox.

get_ddoc_dbase

string: the name of the DocuVault

none

Retrieves the name of the DocuVault that contains this page.

get_ddoc_id

u_int: the document ID

none

Retrieves the ID of the document containing this page.

get_height

real: the height of the page

none

Retrieves the height of the page.

get_next_log_page

page: the next logical page in the document

none

Returns the next logical page in the document.

get_page_face

enum: the plex value of the page

none

Returns the plex value of the page.

get_page_forms

form_list: the forms on the page

none

Returns a list of all forms on the page.

get_page_orientation

enum: the page orientation

none

Returns the page orientation.

get_physical_page_text

string: the text on the physical page

x_top (real): the horizontal coordinate of the top left corner.

y_top (real): the vertical coordinate of the top left corner.

x_bottom (real): the horizontal coordinate of the bottom right corner.

y_bottom (real): the vertical coordinate of the bottom right corner.

Returns the text from the rectangle formed by the specified coordinates on the physical page.

get_physical_page_text_by_rdm_region

string: the text from the region

region (string): the name of the RDM region that contains the text you want to retrieve.

Retrieves text from an RDM region on the physical page.

get_physical_page_text_by_region

string: the text from the region

region (string): the name of the CPF region that contains the text you want to retrieve.

Retrieves text from a CPF region on the physical page.

get_physical_text_by_databox

string: the text from the databox

dbox (databox): the databox whose text you want to extract.

Retrieves text from the specified databox. The databox location is relative to the physical page (the page as it is viewed or printed) instead of to the logical page.

get_prev_log_page

page: the previous logical page in the document

none

Returns the previous logical page in the document.

get_prod_orientation

enum: the production page orientation

none

Returns the orientation of the page as it is actually stored, which may be different than the viewing orientation returned by get_page_orientation.

get_stickynote_positions

 

bool: true on success, false on error

 

position array (array): two-dimensional real array that is filled with the position information of the sticky notes.

The first dimension of the array is automatically resized to the number of sticky notes if it is not large enough. The second dimension is automatically resized to 4 if it is not large enough.

A row of the two-dimensional array is filled for each sticky note.

Each row contains these four items:

The X (horizontal) location of the upper left corner of the sticky note (in meters).
The Y (vertical) location of the upper left corner of the sticky note (in meters).

Returns the position of the sticky notes on the page.

 

The X (horizontal) location of the lower right corner of the sticky note (in meters).
The Y (vertical) location of the lower right corner of the sticky note (in meters).

count(int): an integer variable that returns the number of rows of the array that are filled (i.e., the number of sticky notes on the page).

get_stickynotes

bool: true on success, false on error

stickynote array (array): an array of the sticky notes on this page.

The array is automatically resized if it is not large enough.

Returns the list of sticky notes on this page.

count (int): number of sticky notes on this page.

get_stickynote_text

bool: true on success, false on error

text array (array): a string array that is filled with the text of the sticky notes.

The array is automatically resized if it is not large enough.

count (int): an integer variable that returns the number of text strings placed into the array (i.e., the number of sticky notes on the page).

Returns the text of the sticky notes on the page.

get_stock_id

u_int: the stock ID

none

Returns the page’s stock ID number.

get_stock_name

string: the stock name

none

Returns the name of the page’s stock.

get_text

string: the text on the logical page

x_top (real): the horizontal coordinate of the top left corner.

y_top (real): the vertical coordinate of the top left corner.

x_bottom (real): the horizontal coordinate of the bottom right corner.

y_bottom (real): the vertical coordinate of the bottom right corner.

Returns the text from the rectangle formed by the specified coordinates on the logical page.

get_text_by_databox

string: the text from the databox

dbox (databox): the databox whose text you want to extract.

Retrieves text from the specified databox.

get_text_by_page_var

string: the text from the page variable

pg_var (string): the name of the page variable whose text you want to extract.

Retrieves text from the specified page variable.

get_text_by_rdm_region

string: the text from the region

region (string): the name of the RDM region that contains the text you want to retrieve.

Retrieves text from an RDM region on the logical page.

get_text_by_region

string: the text from the region

region (string): the name of the CPF region that contains the text you want to retrieve.

Retrieves text from an CPF region on the logical page.

get_tiff_length

u_int: the length of the page as converted to a TIFF image

img_res (int): the image resolution of the TIFF data (300 or 600 dpi).

Returns the page’s length as converted to a TIFF image.

get_variable

string: the text from the associated variable

var_name (string): the name of the associated variable whose value you want to retrieve.

Retrieves the value of an associated variable.

get_whole_page_contents

bool: true on success, false on error

content (page_content): the contents of the page.

Retrieves the contents of the entire page.

get_width

real: the width of the page

none

Retrieves the width of the page.

is_valid_page

bool: true if the page is valid, false if it is not

none

Determines whether the page is valid or not.

join_production_page

bool: true on success, false on error

pg (page): the page to join.

Joins the specified page to the current page.

load_stickynotes

bool: true on success, false on error

none

Loads the sticky notes for the page from the DocuVault.

make_blank_page

bool: true on success, false on error

tmplt (page): the page to use as a template.

Creates a blank page using the specified page as a template.

num_index_for_new_doc

bool: true on success, false on failure

idx_name (string): the name of the index.

Indexes all pages in the new document by a specified numeric index and value.

idx_value (real): the index value.

num_index_page

bool: true on success, false on failure

doc (document): the document to which this page is indexed.

Indexes a specific page in the document by a specified numeric index and value.

idx_name (string): the name of the index.

idx_value (real): the index value.

num_index_page_text

bool: true on success, false on failure

doc (document): the document to which this page is indexed.

Indexes a specific page in the document by the specified numeric index using the specified template.

idx_name (string): the name of the index.

idx_value (string): the index value.

idx_template (string): the name of the template to apply to the value.

num_index_text_for_new_doc

bool: true on success, false on failure

idx_name (string): the name of the index.

Indexes all pages in the new document by a specified numeric index and value using the specified template.

idx_value (string): the index value.

idx_template (string): the name of the template to apply to the value.

outline_databox

bool: true on success, false on error

dbox (databox): the databox to outline.

line (real): the width of the outline.

Outlines a databox on the page.

print

none

print type (enum): an integer indicating the location to which CPF should print the properties.

Emits a list of page properties and their values.

remove_all_forms

bool: true on success, false on error

none

Removes all forms from the page.

remove_all_images

bool: true on success, false on error

none

Removes all images from the page.

remove_form

bool: true on success, false on error

remove_fm (form): the form to remove.

Removes a specified form from the page.

remove_image

bool: true on success, false on error

remove_img (image): the image to remove.

Removes a specified image from the page.

set_page_face

none

plex (enum): the plex value.

Sets the page’s plex value.

set_page_orientation

none

view_orn (enum): the view orientation of the page.

Sets the page’s view orientation.

set_prod_matrix

none

pg_matrix (matrix): the matrix to apply to the page.

Sets the page’s matrix.

set_stickynotes

bool: true on success, false on error

stickynote array (array): an array of the sticky notes that will be added to this page in the DocuVault.

Sets the sticky notes on this page.

count (int): number of sticky notes in the array that are to be set onto this page.

set_variable

none

var_name (string): the name of the associated variable to set.

value (string): the value of the variable.

Sets an associated variable and value for the page.

unindex

bool: true on success, false on failure

idx_doc (document): the document to which the page belongs.

idx_name (string): the index to remove.

Removes a specified index and all its values from the page.

unindex_dtm_value

bool: true on success, false on failure

idx_doc (document): the document to which the page belongs.

idx_name (string): the index to remove.

idx_value (tstamp): the index value to remove.

Removes a specified date/time index from the page when it is set to the specified value.

unindex_num_value

bool: true on success, false on failure

idx_doc (document): the document to which the page belongs.

idx_name (string): the index to remove.

idx_value (real): the index value to remove.

Removes a specified numeric index from the page when it is set to the specified value.

unindex_text_value

bool: true on success, false on failure

idx_doc (document): the document to which the page belongs.

idx_name (string): the index to remove.

idx_value (string): the index value to remove.

Removes a specified text index from the page when it is set to the specified value.