PTC ALD in Arbortext Styler > Components of Documents and Templates > Driving Page Layout > Page And Document Sequence Control > Document Sequence Items
Document Sequence Items
Document sequence items can be used in two different ways:
Specified in a document sequence control stream (see Document Sequence Control Streams
Created dynamically during formatting and applied, as described here
The fDocumentSequenceItem has two required properties — id and sequence. The id property provides information that can be used when querying the current page. The sequence property refers to an fPageSequence object, which represents a page sequence control stream. See Page Sequence Control Streams for information.
There are other key properties for the fDocumentSequenceItem object:
start — advises whether the page sequence specified by fDocumentSequenceItem.sequence starts on an odd or an even page, or any page
The fDocumentSequenceItem.StartForce constant lists the suitable values for the start property.
end — advises whether the page sequence specified by fDocumentSequenceItem.sequence ends on, or contains, an odd or even number of pages
The fDocumentSequenceItem.EndForce constant lists the suitable values for the end property.
defaultPageHeight and defaultPageWidth — define default height and width for the pages created
You can set page dimensions on the page layers in the current page sequence. PTC Arbortext Layout Developer will use the values of these properties it cannot derive the set dimensions.
initial —specifies the initial page number for the page sequence
Page sequences, when they are called, can be given their own page numbering sequence. The format of that page number can also be specified using properties:
If the value of the initial property is a positive integer, PTC Arbortext Layout Developer uses this as the starting page number for the sequence.
The fDocumentSequenceItem.InitialPageNumber constant lists values that instruct PTC Arbortext Layout Developer to generate the first page number in the sequence dynamically. For example, fDocumentSequenceItem.INITIAL_AUTO sets the number of the first page in the sequence to a value that is 1 higher that the previous page number.
numberFormat, formatSeparator, and formatSeparatorWidth — specify the formatting of the page sequence’s page number
Document sequence items are created using the object’s constructor, for example:
var myDSItem = new fDocumentSequenceItem;
var pSeq = template.content.getPageSequence("myChapterPageSequence"); = "123";
mDSItem.sequence = pSeq;
In this example, the variable pSeq references the page sequence control stream myChapterPageSequence, assuming it exists. The document sequence item is given the ID 123 and assigned the page sequence myChapterPageSequence.