PDefineMasterPage

Creates or redefines the named master page, setting the specified margins and columns. Turns to the specified master.


Command constructor

PDefineMasterPage(const char * sMasterName, PMBool bOverwrite, PMBool bSpread, long xLeftOrInside, long yTop, long xRghtOrOutsd, long yBottom, short nColumns, long xGutter, short nColmnRghtPg, long xGutterRghtPg);
const char * sMasterName;
Master-page name to define or redefine (maximum of 31 characters; cannot be Document Master or None)
PMBool bOverwrite;
false to leave existing master unchanged (if one exists with same name)
true to overwrite existing master (if one exists with same name)
PMBool bSpread;
false for a one-page master
true for a two-page master spread
kParmDontCare if redefining an existing master page (you cannot change this setting when redefining)
kParmDefault to use current Document Master setting
long xLeftOrInside;
Inside (or left) margin in twips
kParmDontCare to leave margin unchanged (use only if redefin ing an existing master page)
kParmDefault to use current Document Master setting
long yTop;
Top margin in twips
kParmDontCare to leave margin unchanged (use only if redefin ing an existing master page)
kParmDefaultto use current Document Master setting
long xRghtOrOutsd;
Outside (or right) margin in twips
kParmDontCare to leave margin unchanged (use only if redefin ing an existing master page)
kParmDefault to use current Document Master setting
long yBottom;
Bottom margin in twips
kParmDontCare to leave margin unchanged (use only if redefin ing an existing master page)
kParmDefault to use current Document Master setting
short nColumns;
Number of columns either on a single page if the master is a single page, or on the left page if the master is a two-page spread
kParmDontCare to leave number of columns unchanged (use only if redefining an existing master page)
kParmDefault to use current Document Master setting
long xGutter;
Space between columns on a single page or the left page of a two-page spread in twips
kParmDontCare to leave gutter unchanged (use only if redefin ing an existing master page)
kParmDefault to use current Document Master setting
short nColmnRghtPg;
Number of columns on the right page of a two -page spread
Ignored if master is a single page
kParmDontCare to leave number of columns unchanged (use only if redefining an existing master page)
kParmDefault to use current Document Master setting
long xGutterRghtPg;
Space between columns on the right page of a two-page spread
Ignored if master is a single page in twips
kParmDontCare to leave gutter unchanged (use only if redefining an existing master page)
kParmDefault to use current Document Master setting
Unique names. When you create a new master page, make sure you are not overwriting an existing master page. Use the PGetMasterPageList to determine the names of all existing master pages.

Modifying Document Master. You cannot modify the Document Master using the PDefineMasterPage command. To change the margins of the Document Master, use the PPageMargins command. To change its column guides, display the Document Master (using the PPage command) and use the PColumnGuides commands.

Cannot change spread. You cannot change the spread setting of an existing master page. If you are redefining a master page, you must set bSpread to kParmDontCare. Otherwise PageMaker returns an error. (If you set bSpread to kParmDontCare and the named master doesn't exist, PageMaker also returns an error.)

Example. The following example creates the master spread "ad layout master" (unless a master page with the same name already exists). The settings for the master page are: an inside margin of 1 inch, a top margin of 0.5 inches, an outside margin of 0.75 inches, and a bottom margin of 0.5 inches; both pages have two columns with a 0.2-inch gutter between the columns.

PDefineMasterPage("ad layout master", false, true, twips("1i"), twips(".5i"), twips(".75i"), twips(".5i"), 2, twips(".2i"), 2, twips(".2i"));


See also

The PColumnGuides, PDeleteMasterPage, PMasterPage, PPage, PPageMargins, PRenameMasterPage, and PSaveAsMasterPage commands

The PGetMasterPage, PGetMasterPageInfo, and PGetMasterPageList queries

Adobe PageMaker 6.5 Help > Commands > Window > Master Pages



Copyright © 1996, Adobe Systems Incorporated. All rights reserved.

Comments or suggestions? Contact Adobe Developer Support