PTC ALD in Arbortext Styler > Integration of PTC Arbortext Layout Developer in Arbortext Styler > ALD Source Code Edits > Page Type Source Edits
  
Page Type Source Edits
Page Type Source Structure
The process of associating a layout with a page set’s page sequence calls the JavaScript function which creates the page type. That function is the source available through page type source edits.
The function receives a number of arguments from the calling page type, such as the pageInfo object (which holds page size information such as page dimensions and column widths) and whether the page appears on an odd or even page. The arguments are assigned to variables at the top of the function.
The source creates an fLayerGroup object to hold its page layers. The page regions assigned to the page type are applied to this object later. The layer group created is named after the page type. It includes three layers:
The global underlay layer
This layer is empty but can be used to apply document-wide underprinting content such as a watermark.
The page type layer
This layer includes the page regions for the page type.
The global overlay layer
This layer can be used to apply document-wide overprinting content. It is also empty when created.
The page type layer is given a height and a width based on the pageInfo information, which was set up in the page set. Providing these measurements for the layer sets the dimensions of the final page, assuming the other layers in the page are smaller. You can edit these values to override the page dimensions defined by the page set for this page type.
The page regions applied to the page type are generated on demand using a page region-specific function. Calling these functions creates a new page region (a page frame in PTC Arbortext Layout Developer) which is specific to that page type. This is necessary as Arbortext Styler supports the application of a page region to different page types which are used within page sets of different dimensions. The Arbortext Styler feature of specifying page region locations and dimensions based on the page geometry means that each region must be specific to the page type. The function executed is exposed to Arbortext Styler through the page region source. It receives arguments passing the current page type layer, the pageInfo object and the odd/even page or blank page status of the page. you can make edits here to add other frames, including custom frames not defined in the stylesheet.
Once page regions have been assigned, the next section of code assigns one of the content streams created by the page type to the page region which is formatted first by PTC ALD. This specifies the formatted page number that is held by the page string. This code should not be edited.