org.apache.poi.hssf.usermodel
Class HSSFPrintSetup

java.lang.Object
  extended by org.apache.poi.hssf.usermodel.HSSFPrintSetup

public class HSSFPrintSetup
extends java.lang.Object

Used to modify the print setup.

Paper size constants have been added for the ones I have access to. They follow as:
public static final short LETTER_PAPERSIZE = 1;
public static final short LEGAL_PAPERSIZE = 5;
public static final short EXECUTIVE_PAPERSIZE = 7;
public static final short A4_PAPERSIZE = 9;
public static final short A5_PAPERSIZE = 11;
public static final short ENVELOPE_10_PAPERSIZE = 20;
public static final short ENVELOPE_DL_PAPERSIZE = 27;
public static final short ENVELOPE_CS_PAPERSIZE = 28;
public static final short ENVELOPE_MONARCH_PAPERSIZE = 37;

Author:
Shawn Laubach (slaubach at apache dot org)

Field Summary
static short A4_PAPERSIZE
           
static short A5_PAPERSIZE
           
static short ENVELOPE_10_PAPERSIZE
           
static short ENVELOPE_CS_PAPERSIZE
           
static short ENVELOPE_DL_PAPERSIZE
           
static short ENVELOPE_MONARCH_PAPERSIZE
           
static short EXECUTIVE_PAPERSIZE
           
static short LEGAL_PAPERSIZE
           
static short LETTER_PAPERSIZE
           
 
Constructor Summary
protected HSSFPrintSetup(PrintSetupRecord printSetupRecord)
          Constructor.
 
Method Summary
 short getCopies()
          Returns the number of copies.
 boolean getDraft()
          Returns the draft mode.
 short getFitHeight()
          Returns the number of pages high to fit the sheet in.
 short getFitWidth()
          Returns the number of pages wide to fit sheet in.
 double getFooterMargin()
          Returns the footer margin.
 double getHeaderMargin()
          Returns the header margin.
 short getHResolution()
          Returns the horizontal resolution.
 boolean getLandscape()
          Returns the landscape mode.
 boolean getLeftToRight()
          Returns the left to right print order.
 boolean getNoColor()
          Returns the black and white setting.
 boolean getNoOrientation()
          Returns the no orientation.
 boolean getNotes()
          Returns the print notes.
 short getOptions()
          Returns the bit flags for the options.
 short getPageStart()
          Returns the page start.
 short getPaperSize()
          Returns the paper size.
 short getScale()
          Returns the scale.
 boolean getUsePage()
          Returns the use page numbers.
 boolean getValidSettings()
          Returns the valid settings.
 short getVResolution()
          Returns the vertical resolution.
 void setCopies(short copies)
          Sets the number of copies.
 void setDraft(boolean d)
          Set whether it is in draft mode
 void setFitHeight(short height)
          Set the number of pages high to fit the sheet in
 void setFitWidth(short width)
          Set the number of pages wide to fit the sheet in
 void setFooterMargin(double footermargin)
          Sets the footer margin.
 void setHeaderMargin(double headermargin)
          Sets the header margin.
 void setHResolution(short resolution)
          Sets the horizontal resolution.
 void setLandscape(boolean ls)
          Set whether to print in landscape
 void setLeftToRight(boolean ltor)
          Set whether to go left to right or top down in ordering
 void setNoColor(boolean mono)
          Set whether it is black and white
 void setNoOrientation(boolean orientation)
          Set no orientation.
 void setNotes(boolean printnotes)
          Print the include notes
 void setOptions(short options)
          Sets the options flags.
 void setPageStart(short start)
          Set the page numbering start.
 void setPaperSize(short size)
          Set the paper size.
 void setScale(short scale)
          Set the scale.
 void setUsePage(boolean page)
          Set whether to use page start
 void setValidSettings(boolean valid)
          Valid settings.
 void setVResolution(short resolution)
          Sets the vertical resolution.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LETTER_PAPERSIZE

public static final short LETTER_PAPERSIZE
See Also:
Constant Field Values

LEGAL_PAPERSIZE

public static final short LEGAL_PAPERSIZE
See Also:
Constant Field Values

EXECUTIVE_PAPERSIZE

public static final short EXECUTIVE_PAPERSIZE
See Also:
Constant Field Values

A4_PAPERSIZE

public static final short A4_PAPERSIZE
See Also:
Constant Field Values

A5_PAPERSIZE

public static final short A5_PAPERSIZE
See Also:
Constant Field Values

ENVELOPE_10_PAPERSIZE

public static final short ENVELOPE_10_PAPERSIZE
See Also:
Constant Field Values

ENVELOPE_DL_PAPERSIZE

public static final short ENVELOPE_DL_PAPERSIZE
See Also:
Constant Field Values

ENVELOPE_CS_PAPERSIZE

public static final short ENVELOPE_CS_PAPERSIZE
See Also:
Constant Field Values

ENVELOPE_MONARCH_PAPERSIZE

public static final short ENVELOPE_MONARCH_PAPERSIZE
See Also:
Constant Field Values
Constructor Detail

HSSFPrintSetup

protected HSSFPrintSetup(PrintSetupRecord printSetupRecord)
Constructor. Takes the low level print setup record.

Parameters:
printSetupRecord - the low level print setup record
Method Detail

setPaperSize

public void setPaperSize(short size)
Set the paper size.

Parameters:
size - the paper size.

setScale

public void setScale(short scale)
Set the scale.

Parameters:
scale - the scale to use

setPageStart

public void setPageStart(short start)
Set the page numbering start.

Parameters:
start - the page numbering start

setFitWidth

public void setFitWidth(short width)
Set the number of pages wide to fit the sheet in

Parameters:
width - the number of pages

setFitHeight

public void setFitHeight(short height)
Set the number of pages high to fit the sheet in

Parameters:
height - the number of pages

setOptions

public void setOptions(short options)
Sets the options flags. Not advisable to do it directly.

Parameters:
options - The bit flags for the options

setLeftToRight

public void setLeftToRight(boolean ltor)
Set whether to go left to right or top down in ordering

Parameters:
ltor - left to right

setLandscape

public void setLandscape(boolean ls)
Set whether to print in landscape

Parameters:
ls - landscape

setValidSettings

public void setValidSettings(boolean valid)
Valid settings. I'm not for sure.

Parameters:
valid - Valid

setNoColor

public void setNoColor(boolean mono)
Set whether it is black and white

Parameters:
mono - Black and white

setDraft

public void setDraft(boolean d)
Set whether it is in draft mode

Parameters:
d - draft

setNotes

public void setNotes(boolean printnotes)
Print the include notes

Parameters:
printnotes - print the notes

setNoOrientation

public void setNoOrientation(boolean orientation)
Set no orientation. ?

Parameters:
orientation - Orientation.

setUsePage

public void setUsePage(boolean page)
Set whether to use page start

Parameters:
page - Use page start

setHResolution

public void setHResolution(short resolution)
Sets the horizontal resolution.

Parameters:
resolution - horizontal resolution

setVResolution

public void setVResolution(short resolution)
Sets the vertical resolution.

Parameters:
resolution - vertical resolution

setHeaderMargin

public void setHeaderMargin(double headermargin)
Sets the header margin.

Parameters:
headermargin - header margin

setFooterMargin

public void setFooterMargin(double footermargin)
Sets the footer margin.

Parameters:
footermargin - footer margin

setCopies

public void setCopies(short copies)
Sets the number of copies.

Parameters:
copies - number of copies

getPaperSize

public short getPaperSize()
Returns the paper size.

Returns:
paper size

getScale

public short getScale()
Returns the scale.

Returns:
scale

getPageStart

public short getPageStart()
Returns the page start.

Returns:
page start

getFitWidth

public short getFitWidth()
Returns the number of pages wide to fit sheet in.

Returns:
number of pages wide to fit sheet in

getFitHeight

public short getFitHeight()
Returns the number of pages high to fit the sheet in.

Returns:
number of pages high to fit the sheet in

getOptions

public short getOptions()
Returns the bit flags for the options.

Returns:
bit flags for the options

getLeftToRight

public boolean getLeftToRight()
Returns the left to right print order.

Returns:
left to right print order

getLandscape

public boolean getLandscape()
Returns the landscape mode.

Returns:
landscape mode

getValidSettings

public boolean getValidSettings()
Returns the valid settings.

Returns:
valid settings

getNoColor

public boolean getNoColor()
Returns the black and white setting.

Returns:
black and white setting

getDraft

public boolean getDraft()
Returns the draft mode.

Returns:
draft mode

getNotes

public boolean getNotes()
Returns the print notes.

Returns:
print notes

getNoOrientation

public boolean getNoOrientation()
Returns the no orientation.

Returns:
no orientation

getUsePage

public boolean getUsePage()
Returns the use page numbers.

Returns:
use page numbers

getHResolution

public short getHResolution()
Returns the horizontal resolution.

Returns:
horizontal resolution

getVResolution

public short getVResolution()
Returns the vertical resolution.

Returns:
vertical resolution

getHeaderMargin

public double getHeaderMargin()
Returns the header margin.

Returns:
header margin

getFooterMargin

public double getFooterMargin()
Returns the footer margin.

Returns:
footer margin

getCopies

public short getCopies()
Returns the number of copies.

Returns:
number of copies


Copyright 2008 The Apache Software Foundation or its licensors, as applicable.