Package org.docx4j.model.structure
Class PageDimensions
java.lang.Object
org.docx4j.model.structure.PageDimensions
Wraps PgSz (Page size) and PgMar (margin settings).
- gives you an easy way to set these;
- performs a few useful calculations
Used in SectionWrapper, to store the dimensions
of a page for a section; can also be used to
store a set of page dimensions which aren't
associated with any section.
- Author:
- jharrop
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPageDimensions(SectPr sectPr) PageDimensions(SectPr.PgSz pgSz, SectPr.PgMar pgMar) -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Deprecated.intintintGet the distance from the bottom edge of the paper to the bottom edge of the footerintGet the distance from the top edge of the paper to the top edge of the headergetPgMar()getPgSz()intDeprecated.intvoidset Margins from docx4j.propertiesvoidvoidsetPgMar(SectPr.PgMar pgMar) voidset page size/orientation from docx4j.propertiesvoidsetPgSize(PageSizePaper sz, boolean landscape) voidsetPgSz(SectPr.PgSz pgSz)
-
Field Details
-
log
protected static org.slf4j.Logger log
-
-
Constructor Details
-
PageDimensions
public PageDimensions() -
PageDimensions
- Since:
- 2.7
-
PageDimensions
- Since:
- 2.7
-
-
Method Details
-
getPgSz
- Since:
- 2.7
-
setPgSz
- Since:
- 2.7
-
createPgSize
Deprecated. -
getPgMar
- Since:
- 2.7
-
setPgMar
- Since:
- 2.7
-
createPgMar
Deprecated. -
setMargins
public void setMargins()set Margins from docx4j.properties- Since:
- 2.8
-
setMargins
- Since:
- 2.7
-
setPgSize
public void setPgSize()set page size/orientation from docx4j.properties- Since:
- 2.8
-
setPgSize
- Since:
- 2.7
-
getWritableWidthTwips
public int getWritableWidthTwips() -
getWritableHeightTwips
Deprecated.headers/footers into account! Doesn't take- Since:
- 3.0.1
-
getHeaderMargin
public int getHeaderMargin()Get the distance from the top edge of the paper to the top edge of the header -
getColsNum
public int getColsNum() -
getColsSpacing
public int getColsSpacing()
-