public class PageStyleBuilder extends Object implements StyleBuilder<PageStyle>, HidableBuilder<PageStyleBuilder>
| Modifier and Type | Method and Description |
|---|---|
PageStyleBuilder |
allMargins(Length margin)
Set the margin at the top, bottom, left and right. margin is a length value
|
PageStyleBuilder |
backgroundColor(Color color)
Set the background color to color, a six-digit hex value.
|
PageStyle |
build() |
PageStyleBuilder |
centering(PageCentering centering)
20.353 style:table-centering
|
PageStyleBuilder |
footer(Footer footer)
Set the footer
|
PageStyleBuilder |
header(Header header)
Set the header
|
PageStyleBuilder |
hidden()
Make this style hidden, ie part of automatic styles
|
PageStyleBuilder |
marginBottom(Length margin)
Set the bottom margin. margin is a length value
|
PageStyleBuilder |
marginLeft(Length margin)
Set the left margin. margin is a length value
|
PageStyleBuilder |
marginRight(Length margin)
Set the right margin. margin is a length value
|
PageStyleBuilder |
marginTop(Length margin)
Set the top margin. margin is a length value
|
PageStyleBuilder |
masterPageStyle(MasterPageStyle masterPageStyle)
Set a master page style
|
PageStyleBuilder |
pageHeight(Length pageHeight)
Set the page height. pageHeight is a length value.
|
PageStyleBuilder |
pageLayoutStyle(PageLayoutStyle pageLayoutStyle)
Set a page layout style
|
PageStyleBuilder |
pageWidth(Length pageWidth)
Set the page width. pageWidth is a length value.
|
PageStyleBuilder |
paperFormat(PaperFormat paperFormat)
Set the paper format to one of: A3, A4, A5, LETTER, LEGAL, USER
USER is automatically used if you use
setPageHeight() or setPageWidth(). |
PageStyleBuilder |
printOrientationHorizontal()
Set the print orientation to horizontal
|
PageStyleBuilder |
printOrientationVertical()
Set the print orientation to vertical
|
PageStyleBuilder |
scaleTo(int percentage)
20.344style:scale-to
|
PageStyleBuilder |
scaleToPages(int pages)
20.345style:scale-to-pages
|
PageStyleBuilder |
scaleToX(int pages)
(v1.3) 20.354 style:scale-to-X
|
PageStyleBuilder |
scaleToY(int pages)
(v1.3) 20.355 style:scale-to-Y
|
PageStyleBuilder |
writingMode(PageWritingMode writingMode)
Set the writing mode to one of: LRTB (left to right; top to bottom), RLTB,
TBRL, TBLR, LR, RL, TB, PAGE
|
public PageStyle build()
build in interface StyleBuilder<PageStyle>public PageStyleBuilder allMargins(Length margin)
margin - the length of the marginpublic PageStyleBuilder backgroundColor(Color color)
color - the color as an hexadecimal valuepublic PageStyleBuilder masterPageStyle(MasterPageStyle masterPageStyle)
masterPageStyle - the stylepublic PageStyleBuilder pageLayoutStyle(PageLayoutStyle pageLayoutStyle)
pageLayoutStyle - the stylepublic PageStyleBuilder footer(Footer footer)
footer - the footerpublic PageStyleBuilder header(Header header)
header - the headerpublic PageStyleBuilder marginBottom(Length margin)
margin - the length of the marginpublic PageStyleBuilder marginLeft(Length margin)
margin - the length of the marginpublic PageStyleBuilder marginRight(Length margin)
margin - the length of the marginpublic PageStyleBuilder marginTop(Length margin)
margin - the length of the marginpublic PageStyleBuilder pageHeight(Length pageHeight)
pageHeight - the height of the pagepublic PageStyleBuilder pageWidth(Length pageWidth)
pageWidth - the page widthpublic final PageStyleBuilder paperFormat(PaperFormat paperFormat)
setPageHeight() or setPageWidth().paperFormat - the format of the pagepublic PageStyleBuilder printOrientationHorizontal()
public PageStyleBuilder printOrientationVertical()
public PageStyleBuilder writingMode(PageWritingMode writingMode)
writingMode - the writing modepublic PageStyleBuilder hidden()
HidableBuilderhidden in interface HidableBuilder<PageStyleBuilder>public PageStyleBuilder scaleTo(int percentage)
percentage - the percentage value to scalepublic PageStyleBuilder scaleToPages(int pages)
pages - "the number of pages on which a document should be printed."public PageStyleBuilder scaleToX(int pages)
pages - the number of pagespublic PageStyleBuilder scaleToY(int pages)
pages - the number of pagespublic PageStyleBuilder centering(PageCentering centering)
centering - "specifies whether tables are centered horizontally and/or vertically on
the page"Copyright © 2016–2021. All rights reserved.