margins
The margins object is used to set a Print section or Master Page's margins in a Control Script (see Control Scripts and Control Script API).
Note that Master Pages are only used in a Print context (see Master Pages).
The margins object is retrieved via the section object (see section) or via the masterpages array in a template (see masterpage), respectively.
Fields
| Field | Type | Description | 
|---|---|---|
| bottom left right top  | 
                                                            String | 
                                                                 These fields allow to set the bottom, left, right and top of a Print section, using a Measurement string, for example: "2in" (this sets a margin to two inches).  | 
                                                        
| footer header  | 
                                                            
                                                                 String  | 
                                                            
                                                                 These fields allow to set the header and footer of a Master Page, using a Measurement string.  | 
                                                        
Examples
Setting the margins of a Print section
Copy
                                                    
                                                
                                                var sectionA = merge.template.contexts.PRINT.sections["Section A"];
sectionA.margins.top = "2in";
sectionA.margins.left = "2in";
sectionA.margins.right = "2in";
sectionA.margins.bottom = "2in";
                                                    Setting the header and footer of a Master Page
Copy
                                                    
                                                
                                            var masterA = merge.template.masterpages["Master page A"];
masterA.margins.header = "2in";
masterA.margins.footer = "2in";