You are here: Section Rules Reference > Section Rules Summary > SetOrigin

SetOrigin

Use this section level rule to set the section overlay/page segment X and Y coordinates. Using this rule, you specify where the page segment will be placed on the printed page.

You can also use the SetOriginI and SetOriginM rules. SetOriginI works just like SetOrigin except you enter X and Y coordinate information in inches, instead of FAP units. There are 2400 FAP units per inch.

SetOriginM works just like SetOrigin except you enter X and Y coordinate information in millimeters. There are approximately 98 FAP units per millimeter.

Use the SetOrigin rule if you prefer to enter these coordinates in FAP units.

Syntax

;SetOrigin (Fixed,X,Y,Form,Store,ImageName)

Parameter

Description

FIXED

(Optional) Anchors the section at the specified X and Y coordinates. This must be the first parameter listed. See Fixing a section’s position for more information.

X

Sets the X coordinate. This determines the section’s horizontal position.

Y

Sets the Y coordinate. This determines the section’s vertical position.

Form

(Optional) The form name on which the section exists. This parameter lets you define more than one SetOrigin rule for a section and specify which one applies based on the name of the form.

Store( )

(Optional) This parameter lets you store the current section coordinates in prefix-name variables for later use. The syntax is:

Store(prefix-name variable)

For Windows, the coordinates are stored in:

prefix-name.left, prefix-name.right, prefix-name.top, and prefix-name.bottom

The stored coordinates can be referenced by any subsequent SetOrigin rule used to place a section on the same form.

The X and Y coordinates are specified using a combination of the following parameter prefixes plus the addition or subtraction of FAP units. There are 2400 FAP units per inch. Here are the prefixes you can use:

Prefix

Description

Abs

Absolute page position based on 2400 units per inch. (supports overflow)

Rel

Relative to the last section’s top left coordinate. (supports overflow)

Max

Relative to the last section’s maximum edge. For example, Rel+0,Max+600 would position the current section ¼ inch below the last section. (supports overflow)

Mpg

Relative to any section at the maximum edge. For example, Abs+0,Mpg+600 places the current section ¼ inch below the lowest object currently on the page. (does not support overflow)

T2T

Top edge is placed relative to the last section’s top edge. (Similar to Rel)

T2B

Top edge is placed relative to the last section’s bottom edge. (Similar to Max+)

B2T

Bottom edge is placed relative to the last section’s top edge. (Similar to Max-)

 

Bottom edge is placed relative to the last section’s bottom edge.

L2L

Left edge is placed relative to the last section’s left edge. (Similar to Rel)

L2R

Left edge is placed relative to the last section’s right edge. (Similar to Max+)

R2L

Right edge is placed relative to the last section’s left edge. (Similar to Max-)

R2R

Right edge is placed relative to the last section right edge.

Ctr

X/Y dimensions are centered on the last section’s X/Y dimensions.

Fixing a section’s position

The SetOrigin rule lets you designate a section as a fixed section. Fixed sections cannot be moved from their set position.

You declare a section to be fixed by including FIXED as the first parameter of the section's SetOrigin rule. Regardless of when the section is triggered, it will keep the coordinates assigned to it throughout pagination.

Fixed sections can also be designated as CopyOnOverflow sections. This will cause the fixed section to be copied onto subsequent pages at the same coordinates as those used for the first page.

The SetOrigin rule should always define the X,Y coordinates as an absolute position or a position relative to a section that will always be on the page. Do not anchor the fixed section relative to a section that can overflow onto a new page. If you do, the fixed section will never move to the second page. Instead, it will always appear on the first page with coordinates that place it below the bottom of the page.

Here is an example of how you would use the FIXED parameter:

;SetOrigin;Fixed,X,Y,Form,Store(),ImageName;;

Note You must use the SetImageDimensions rule when you use this rule.

See also