Class RtfPageSetting
java.lang.Object
com.lowagie.text.rtf.RtfElement
com.lowagie.text.rtf.document.RtfPageSetting
- All Implemented Interfaces:
RtfBasicElement, RtfExtendedElement
The RtfPageSetting stores the page size / page margins for a RtfDocument.
INTERNAL CLASS - NOT TO BE USED DIRECTLY
- Version:
- $Id:RtfPageSetting.java 3126 2008-02-07 20:30:46Z hallm $
- Author:
- Mark Hall (Mark.Hall@mail.room3b.eu), Thomas Bickel (tmb99@inode.at)
-
Field Summary
Fields inherited from class RtfElement
document, inHeader, inTableFields inherited from interface RtfBasicElement
CLOSE_GROUP, COMMA_DELIMITER, DELIMITER, OPEN_GROUP, TWIPS_FACTOR -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new RtfPageSetting object belonging to a RtfDocument. -
Method Summary
Modifier and TypeMethodDescriptionintGets the bottom marginintGets the left marginintGets the right marginintGets the top marginintGets the page heightintGets the page widthvoidsetMarginBottom(int marginBottom) Sets the bottom marginvoidsetMarginLeft(int marginLeft) Sets the left margin to usevoidsetMarginRight(int marginRight) Sets the right margin to usevoidsetMarginTop(int marginTop) Sets the top margin to usevoidsetPageHeight(int pageHeight) Sets the page height to usevoidsetPageSize(com.lowagie.text.Rectangle pageSize) Set the page size to use.voidsetPageWidth(int pageWidth) Sets the page width to usevoidwriteContent(OutputStream out) unusedvoidwriteDefinition(OutputStream result) Writes the page size / page margin definitionvoidwriteSectionDefinition(OutputStream result) Writes the definition part for a new sectionMethods inherited from class RtfElement
intToByteArray, isInTable, setInHeader, setInTable, setRtfDocumentMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface RtfBasicElement
setInHeader, setInTable, setRtfDocument
-
Constructor Details
-
RtfPageSetting
Constructs a new RtfPageSetting object belonging to a RtfDocument.- Parameters:
doc- The RtfDocument this RtfPageSetting belongs to
-
-
Method Details
-
writeContent
unused- Specified by:
writeContentin interfaceRtfBasicElement- Specified by:
writeContentin classRtfElement- Parameters:
out- TheOutputStreamto write the content to- Throws:
IOException
-
writeDefinition
Writes the page size / page margin definition- Specified by:
writeDefinitionin interfaceRtfExtendedElement- Parameters:
result- TheOutputStreamto write the element definition to- Throws:
IOException
-
writeSectionDefinition
Writes the definition part for a new section- Throws:
IOException
-
getMarginBottom
public int getMarginBottom()Gets the bottom margin- Returns:
- Returns the bottom margin
-
setMarginBottom
public void setMarginBottom(int marginBottom) Sets the bottom margin- Parameters:
marginBottom- The bottom margin to use
-
getMarginLeft
public int getMarginLeft()Gets the left margin- Returns:
- Returns the left margin
-
setMarginLeft
public void setMarginLeft(int marginLeft) Sets the left margin to use- Parameters:
marginLeft- The left margin to use
-
getMarginRight
public int getMarginRight()Gets the right margin- Returns:
- Returns the right margin
-
setMarginRight
public void setMarginRight(int marginRight) Sets the right margin to use- Parameters:
marginRight- The right margin to use
-
getMarginTop
public int getMarginTop()Gets the top margin- Returns:
- Returns the top margin
-
setMarginTop
public void setMarginTop(int marginTop) Sets the top margin to use- Parameters:
marginTop- The top margin to use
-
getPageHeight
public int getPageHeight()Gets the page height- Returns:
- Returns the page height
-
setPageHeight
public void setPageHeight(int pageHeight) Sets the page height to use- Parameters:
pageHeight- The page height to use
-
getPageWidth
public int getPageWidth()Gets the page width- Returns:
- Returns the page width
-
setPageWidth
public void setPageWidth(int pageWidth) Sets the page width to use- Parameters:
pageWidth- The page width to use
-
setPageSize
public void setPageSize(com.lowagie.text.Rectangle pageSize) Set the page size to use. This method will use guessFormat to try to guess the correct page format. If no format could be guessed, the sizes from the pageSize are used and the landscape setting is determined by comparing width and height;- Parameters:
pageSize- The pageSize to use
-