modifyPageLayout
- addBackgroundImage
- addFooter
- addHeader
- addLineNumbering
- addPageBorders
- addProperties
- addSection
- createDocx
- createCharacterStyle
- createListStyle
- createParagraphStyle
- createTableStyle
- docxSettings
- embedFont
- importHeadersAndFooters
- importStyles
- modifyPageLayout
- removeFooters
- removeHeaders
- setBackgroundColor
- setDefaultFont
- setDocumentDefaultStyles
- setEncodeUTF8
- setLanguage
- setMarkAsFinal
- setRTL
- addBibliography
- addBookmark
- addBreak
- addChart
- addCitation
- addComment
- addCrossReference
- addDateAndHour
- addEndnote
- addExternalFile
- addFootnote
- addFormElement
- addHeading
- addImage
- addLink
- addList
- addMathEquation
- addMergeField
- addOLE
- addPageNumber
- addShape
- addSimpleField
- addSource
- addStructuredDocumentTag
- addTable
- addTableContents
- addText
- addTextBox
- addWordML
- embedHTML
- clearBlocks
- deleteTemplateBlock
- getTemplateVariables
- getTemplateVariablesType
- modifyInputFields
- modifyMergeFields
- processTemplate
- removeTemplateVariable
- replaceListVariable
- replacePlaceholderImage
- replaceTableVariable
- replaceVariableByExternalFile
- replaceVariableByHtml
- replaceVariableByText
- replaceVariableByWordFragment
- replaceVariableByWordML
- setTemplateSymbol
- tickCheckbox
modifyPageLayout
BASIC / ADVANCED / PREMIUM
Modifies the Word document layout.
Description
public void modifyPageLayout()
public void modifyPageLayout(String paperType)
public void modifyPageLayout(String paperType, OptionsPageLayout options)
This method modifies the main layout properties of the Word document like paper type size and margins.
Parameters
paperType
The type of paper to be used. The possible values are:
- A4
- A3
- letter
- legal
- A4-landscape
- A3-landscape
- letter-landscape
- legal-landscape
- custom
options
Option | Type | Description |
---|---|---|
width | Integer | Document width in twips (twentieths of a point). |
height | Integer | Document height in twips (twentieths of a point). |
numberCols | Integer | Number of columns. |
orient | String | Page orientation (portrait or landscape). |
marginTop | Integer | Top margin in twips (twentieths of a point). |
marginRight | Integer | Right margin in twips (twentieths of a point). |
marginBottom | Integer | Bottom margin in twips (twentieths of a point). |
marginLeft | Integer | Left margin in twips (twentieths of a point). |
marginHeader | Integer | Header margins in twips (twentieths of a point). |
marginFooter | Integer | Footer margins in twips (twentieths of a point). |
gutter | Integer | Gutter in twips (twentieths of a point). The gutter is only used for binding. |
bidi | Boolean | Set to true for right to left languages. |
rtlGutter | Integer | RTL gutter. |
onlyLastSection | Boolean | If true it only modifies the last section (default value is false). |
sectionNumbers | ArrayList<String> | An ArrayList with the sections that you want to modify. |