com.lowagie.text.rtf.document
public class RtfPageSetting extends RtfElement implements RtfExtendedElement
Version: $Id: RtfPageSetting.java 2796 2007-05-27 09:42:20Z psoares33 $
Field Summary | |
---|---|
boolean | landscape
Whether the page is portrait or landscape |
static byte[] | LANDSCAPE
Constant for landscape |
int | marginBottom
The bottom margin to use |
int | marginLeft
The left margin to use |
int | marginRight
The right margin to use |
int | marginTop
The top margin to use |
static byte[] | MARGIN_BOTTOM
Constant for the bottom margin |
static byte[] | MARGIN_LEFT
Constant for the left margin |
static byte[] | MARGIN_RIGHT
Constant for the right margin |
static byte[] | MARGIN_TOP
Constant for the top margin |
int | pageHeight
The page height to use |
int | pageWidth
The page width to use |
static byte[] | PAGE_HEIGHT
Constant for the page width |
static byte[] | PAGE_WIDTH
Constant for the page height |
static byte[] | SECTION_MARGIN_BOTTOM
Constant for the section bottom margin |
static byte[] | SECTION_MARGIN_LEFT
Constant for the section left margin |
static byte[] | SECTION_MARGIN_RIGHT
Constant for the section right margin |
static byte[] | SECTION_MARGIN_TOP
Constant for the section top margin |
static byte[] | SECTION_PAGE_HEIGHT
Constant for the section page height |
static byte[] | SECTION_PAGE_WIDTH
Constant for the section page width |
Constructor Summary | |
---|---|
RtfPageSetting(RtfDocument doc)
Constructs a new RtfPageSetting object belonging to a RtfDocument.
|
Method Summary | |
---|---|
int | getMarginBottom()
Gets the bottom margin
|
int | getMarginLeft()
Gets the left margin
|
int | getMarginRight()
Gets the right margin
|
int | getMarginTop()
Gets the top margin
|
int | getPageHeight()
Gets the page height
|
int | getPageWidth()
Gets the page width
|
boolean | guessFormat(Rectangle pageSize, boolean rotate)
This method tries to fit the Rectangle pageSize to one of the predefined PageSize rectangles.
|
boolean | rectEquals(Rectangle rect1, Rectangle rect2)
This method compares to Rectangles. |
void | setMarginBottom(int marginBottom)
Sets the bottom margin
|
void | setMarginLeft(int marginLeft)
Sets the left margin to use
|
void | setMarginRight(int marginRight)
Sets the right margin to use
|
void | setMarginTop(int marginTop)
Sets the top margin to use
|
void | setPageHeight(int pageHeight)
Sets the page height to use
|
void | setPageSize(Rectangle pageSize)
Set the page size to use. |
void | setPageWidth(int pageWidth)
Sets the page width to use
|
byte[] | write()
unused |
void | writeContent(OutputStream out)
unused |
byte[] | writeDefinition()
Writes the page size / page margin definition
|
void | writeDefinition(OutputStream result)
Writes the page size / page margin definition |
byte[] | writeSectionDefinition()
Writes the definition part for a new section
|
void | writeSectionDefinition(OutputStream result)
Writes the definition part for a new section |
Parameters: doc The RtfDocument this RtfPageSetting belongs to
Returns: Returns the bottom margin
Returns: Returns the left margin
Returns: Returns the right margin
Returns: Returns the top margin
Returns: Returns the page height
Returns: Returns the page width
Rectangle pageSize
to one of the predefined PageSize rectangles.
If a match is found the pageWidth and pageHeight will be set according to values determined from files
generated by MS Word2000 and OpenOffice 641. If no match is found the method will try to match the rotated
Rectangle by calling itself with the parameter rotate set to true.
Parameters: pageSize the page size for which to guess the correct format rotate Whether we should try to rotate the size befor guessing the format
Returns: True
if the format was guessed, false/
otherwise
Parameters: rect1 The first Rectangle to compare rect2 The second Rectangle to compare
Returns: True
if the Rectangles equal, false
otherwise
Parameters: marginBottom The bottom margin to use
Parameters: marginLeft The left margin to use
Parameters: marginRight The right margin to use
Parameters: marginTop The top margin to use
Parameters: pageHeight The page height to use
Parameters: pageSize The pageSize to use
Parameters: pageWidth The page width to use
Deprecated: replaced by writeContent
unusedDeprecated: replaced by writeDefinition
Writes the page size / page margin definitionReturns: A byte array with the page size / page margin definition
Deprecated: replaced by writeSectionDefinition
Writes the definition part for a new sectionReturns: A byte array containing the definition for a new section