Spread Page Master Extension

AH Formatter V6.5 is able to treat two facing pages (a two-page spread) as a single unit, and you can define spread regions that span across the two pages. You can also define a single background for the two pages.

The requirement for formatting facing pages as a two-page spread appears in:

Only some documents need spreads, but uses for spreads include:

The Spread Page Master Extension adds the following two Formatting Objects:

FODefinition
<axf:spread-page-master>Defines the spread.
<axf:spread-region>Region that can span two pages.

Two-page spreads are typically exceptions to normal formatting, so <axf:spread-page-master> refers to other page masters for the definitions of the two pages' sizes and non-spread regions. When an <axf:spread-region> intersects an <fo:region-body> from one of the page masters, the <fo:region-body> is resized to be a smaller, rectangular region. When an <axf:spread-region> covers an <fo:region-body> from one of the page masters, the <fo:region-body> is dropped from the spread.

CAUTION: Spread Page Master Extension is not effective with AH Formatter V6.5 Lite.

Spread Page Master Extended Elements

<axf:spread-page-master> no-LT

Common Usage:

Specifies a two-page spread.

Areas:

Generates no area directly. It is used in the generation of pages by an fo:page-sequence.

Constraints:
<!ELEMENT axf:spread-page-master (axf:spread-region+)> <!ATTLIST axf:spread-page-master master-name CDATA #REQUIRED> <!ATTLIST axf:spread-page-master axf:left-page-master-reference CDATA #REQUIRED> <!ATTLIST axf:spread-page-master axf:right-page-master-reference CDATA #REQUIRED> <!ATTLIST axf:spread-page-master reference-orientation CDATA "0"> <!ATTLIST axf:spread-page-master writing-mode CDATA "lr-tb"> <!ATTLIST axf:spread-page-master %common-margin-properties-block;>

<axf:spread-region> no-LT

Common Usage:

Specifies a region in a two-page spread.

Areas:

Used to generate one region-viewport-area and one region-reference-area whenever an <axf:spread-page-master> that has an <axf:spread-region> as a child is used to generate a page.

Constraints:
<!ELEMENT axf:spread-region EMPTY> <!ATTLIST axf:spread-region region-name CDATA #REQUIRED> <!ATTLIST axf:spread-region height CDATA "auto"> <!ATTLIST axf:spread-region overflow CDATA "auto"> <!ATTLIST axf:spread-region reference-orientation CDATA "0"> <!ATTLIST axf:spread-region width CDATA "auto"> <!ATTLIST axf:spread-region writing-mode CDATA "lr-tb"> <!ATTLIST axf:spread-region %common-absolute-position-properties;> <!ATTLIST axf:spread-region %common-border-padding-and-background-properties;> <!ATTLIST axf:spread-region %common-margin-properties-block;>

Spread Page Master Extended Properties

axf:left-page-master-reference no-LT

Master name of the page master for the left page of a two-page spread.

Value: <name>
Initial: N/A, a value is required
Applies to: axf:spread-page-master
Inherited: no
Percentages: N/A

Values have the following meanings.

<name>

The name must refer to a master-name that exists within the document.

axf:left-page-master-reference refers to the page master that defines the page size and the non-spread regions for the left-hand page of a two-page spread.

axf:right-page-master-reference no-LT

Master name of the page master for the right page of a two-page spread.

Value: <name>
Initial: N/A, a value is required
Applies to: axf:spread-page-master
Inherited: no
Percentages: N/A

Values have the following meanings.

<name>

The name must refer to a master-name that exists within the document.

axf:right-page-master-reference refers to the page master that defines the page size and the non-spread regions for the right-hand page of a two-page spread.

Spread Page Master Example

The following example shows two axf:spread-page-master. Both axf:spread-page-master use the "left" and "right" fo:simple-page-master for the definitions of the page sizes and non-spread regions. The "a" axf:spread-page-master defines a "spread" axf:spread-region that, in this document, is formatted with a graphic that spans across the two pages of the spread. The "b" axf:spread-page-master defines a "bottom" axf:region-body that is formatted with a block of text.

The axf:spread-page-master are used in page master selection in the same way as fo:simple-page-master, but you should ensure that they are used in pairs as a two-page spread. As shown in the example, properties that can help enforce this are maximum-repeats, initial-page-number, and force-page-count. When you do not know how many pairs of pages the spread content will use and the axf:spread-region is the only region on the pages (for example, the spread pages are a multi-page, double-wide table), either the axf:spread-page-master should be the last page master in the fo:page-sequence-master or the content of the spread pages should be in a nested fo:page-sequence that uses only the axf:spread-page-master.

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"> <fo:layout-master-set> <fo:simple-page-master master-name="left" page-width="70mm" page-height="100mm"> <fo:region-body margin="36pt" margin-right="48pt" background-color="#E1E8E2" padding="6pt"/> <fo:region-before region-name="left-header" extent="36pt" padding-start="36pt" display-align="center"/> <fo:region-after extent="36pt" padding-start="36pt" display-align="center"/> </fo:simple-page-master> <fo:simple-page-master master-name="right" page-width="70mm" page-height="100mm"> <fo:region-body margin="36pt" margin-left="48pt" background-color="#E1E8E2" padding="6pt"/> <fo:region-before region-name="right-header" extent="36pt" padding-end="36pt" display-align="center"/> <fo:region-after extent="36pt" padding-end="36pt" display-align="center"/> </fo:simple-page-master> <axf:spread-page-master master-name="spreadpm" left-page-master-reference="left" right-page-master-reference="right"> <axf:spread-region region-name="top" margin="36pt" margin-bottom="72mm"/> </axf:spread-page-master> <fo:page-sequence-master master-name="psm"> <fo:repeatable-page-master-reference master-reference="spreadpm"/> <fo:repeatable-page-master-alternatives> <fo:conditional-page-master-reference master-reference="left" odd-or-even="even"/> <fo:conditional-page-master-reference master-reference="right" odd-or-even="odd"/> </fo:repeatable-page-master-alternatives> </fo:page-sequence-master> </fo:layout-master-set> <fo:page-sequence master-reference="psm" initial-page-number="2" force-page-count="end-on-odd"> <fo:static-content flow-name="left-header"> <fo:block text-align="outside" margin="0">left</fo:block> </fo:static-content> <fo:static-content flow-name="right-header"> <fo:block text-align="outside" margin="0">right</fo:block> </fo:static-content> <fo:static-content flow-name="xsl-region-after"> <fo:block text-align="outside" margin="0"><fo:page-number /></fo:block> </fo:static-content> <fo:flow flow-name="top"> <fo:block-container height="100%" color="#003D19" font-size="100pt" overflow="condense" axf:overflow-condense="font-size" font-weight="bold"> <fo:block>axf:spread-page-master</fo:block> </fo:block-container> </fo:flow> <fo:flow flow-name="xsl-region-body"> <fo:block> <fo:inline font-weight="bold">AH Formatter</fo:inline> is able to treat two facing pages (a two-page spread) as a single unit, and you can define spread regions that span across the two pages. You can also define a single background for the two pages. </fo:block> <fo:block text-indent="1em"> Only some documents need spreads, but uses for spreads include: titles that extend across two pages; graphics or tables that are wider than one page; full-bleed background images that extend across two pages. </fo:block> </fo:flow> </fo:page-sequence> </fo:root>