append

Syntax: append document, member whichCastmember [, ... , autoAppend ]

append document, member whichCastmember of castLib whichLib [, ... , autoAppend ]

append document, castLib whichCast [, ... , autoAppend ]

append document, sprite whichSprite [, ... , autoAppend ]

append document, string [, ... , autoAppend ]

append document, list [, ... , autoAppend ]

The append command appends one or more items to the current "frame" of a document object. If no current frame exists in your document, the PrintOMatic Xtra will attempt to create a "default" frame for you, which is the width and height of the page, minus the current margins.

The autoAppend parameter, which is always the last parameter in a call to append, controls whether or not new pages will be created "on the fly" if the PrintOMatic Xtra runs out of space on the last "frame" in your document. If this parameter is set to TRUE, new pages will be created with the same "frame" layout as the last page of your document. PrintOMatic will create as many new pages as are necessary to flow all the specified elements into your document . If this parameter is not specified when you call append, its value defaults to TRUE.

AutoAppending is not allowed when flowing items into a frame on the master page of a document.



type of object          what gets appended

_________________________________________________________________



text field cast member  the text of the field, using the 

                        specified fonts and styles



rich text cast member   the bitmap image of the cast member,

                        including anti-aliasing



bitmap cast member      the cast member graphic



PICT cast member        the cast member graphic



cast library            all printable cast members in the 

                        library, in cast sequence



sprite                  the cast member of the sprite



text string             the text string, in the default font 

                       (Geneva 10pt on Macintosh, 

                        Arial 10pt on Windows)



list                    the elements in the list

Example:

The following example creates a PrintOMatic document, sets the document name, creates the first page, adds a frame to it, and appends a number of items to the document, and prints it:

set doc = new(xtra "PrintOMatic")

if not objectP(doc) then exit

setDocumentName doc, "My Example Document"

newPage doc

newFrame doc, Rect(0,0,getPageWidth(doc),getPageHeight(doc)

append doc, sprite 1, TRUE

append doc, [member "image", member "caption", sprite 5], TRUE

append doc, castLib "printout", TRUE

if doJobSetup(doc) then print doc

set doc = 0