FileDocCategorySizeDatePackage
HSSFPrintSetup.javaAPI DocApache Poi 3.0.110512Mon Jan 01 12:39:36 GMT 2007org.apache.poi.hssf.usermodel

HSSFPrintSetup

public class HSSFPrintSetup extends 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)

Fields Summary
public static final short
LETTER_PAPERSIZE
public static final short
LEGAL_PAPERSIZE
public static final short
EXECUTIVE_PAPERSIZE
public static final short
A4_PAPERSIZE
public static final short
A5_PAPERSIZE
public static final short
ENVELOPE_10_PAPERSIZE
public static final short
ENVELOPE_DL_PAPERSIZE
public static final short
ENVELOPE_CS_PAPERSIZE
public static final short
ENVELOPE_MONARCH_PAPERSIZE
PrintSetupRecord
printSetupRecord
Constructors Summary
protected HSSFPrintSetup(PrintSetupRecord printSetupRecord)
Constructor. Takes the low level print setup record.

param
printSetupRecord the low level print setup record

    
                                      
       
	this.printSetupRecord = printSetupRecord;
    
Methods Summary
public shortgetCopies()
Returns the number of copies.

return
number of copies

        return printSetupRecord.getCopies();
    
public booleangetDraft()
Returns the draft mode.

return
draft mode

        return printSetupRecord.getDraft();
    
public shortgetFitHeight()
Returns the number of pages high to fit the sheet in.

return
number of pages high to fit the sheet in

        return printSetupRecord.getFitHeight();
    
public shortgetFitWidth()
Returns the number of pages wide to fit sheet in.

return
number of pages wide to fit sheet in

        return printSetupRecord.getFitWidth();
    
public doublegetFooterMargin()
Returns the footer margin.

return
footer margin

        return printSetupRecord.getFooterMargin();
    
public shortgetHResolution()
Returns the horizontal resolution.

return
horizontal resolution

        return printSetupRecord.getHResolution();
    
public doublegetHeaderMargin()
Returns the header margin.

return
header margin

        return printSetupRecord.getHeaderMargin();
    
public booleangetLandscape()
Returns the landscape mode.

return
landscape mode

        return !printSetupRecord.getLandscape();
    
public booleangetLeftToRight()
Returns the left to right print order.

return
left to right print order

        return printSetupRecord.getLeftToRight();
    
public booleangetNoColor()
Returns the black and white setting.

return
black and white setting

        return printSetupRecord.getNoColor();
    
public booleangetNoOrientation()
Returns the no orientation.

return
no orientation

        return printSetupRecord.getNoOrientation();
    
public booleangetNotes()
Returns the print notes.

return
print notes

        return printSetupRecord.getNotes();
    
public shortgetOptions()
Returns the bit flags for the options.

return
bit flags for the options

        return printSetupRecord.getOptions();
    
public shortgetPageStart()
Returns the page start.

return
page start

        return printSetupRecord.getPageStart();
    
public shortgetPaperSize()
Returns the paper size.

return
paper size

        return printSetupRecord.getPaperSize();
    
public shortgetScale()
Returns the scale.

return
scale

        return printSetupRecord.getScale();
    
public booleangetUsePage()
Returns the use page numbers.

return
use page numbers

        return printSetupRecord.getUsePage();
    
public shortgetVResolution()
Returns the vertical resolution.

return
vertical resolution

        return printSetupRecord.getVResolution();
    
public booleangetValidSettings()
Returns the valid settings.

return
valid settings

        return printSetupRecord.getValidSettings();
    
public voidsetCopies(short copies)
Sets the number of copies.

param
copies number of copies

	printSetupRecord.setCopies(copies);
    
public voidsetDraft(boolean d)
Set whether it is in draft mode

param
d draft

	printSetupRecord.setDraft(d);
    
public voidsetFitHeight(short height)
Set the number of pages high to fit the sheet in

param
height the number of pages

	printSetupRecord.setFitHeight(height);
    
public voidsetFitWidth(short width)
Set the number of pages wide to fit the sheet in

param
width the number of pages

	printSetupRecord.setFitWidth(width);
    
public voidsetFooterMargin(double footermargin)
Sets the footer margin.

param
footermargin footer margin

	printSetupRecord.setFooterMargin(footermargin);
    
public voidsetHResolution(short resolution)
Sets the horizontal resolution.

param
resolution horizontal resolution

	printSetupRecord.setHResolution(resolution);
    
public voidsetHeaderMargin(double headermargin)
Sets the header margin.

param
headermargin header margin

	printSetupRecord.setHeaderMargin(headermargin);
    
public voidsetLandscape(boolean ls)
Set whether to print in landscape

param
ls landscape

	printSetupRecord.setLandscape(!ls);
    
public voidsetLeftToRight(boolean ltor)
Set whether to go left to right or top down in ordering

param
ltor left to right

	printSetupRecord.setLeftToRight(ltor);
    
public voidsetNoColor(boolean mono)
Set whether it is black and white

param
mono Black and white

	printSetupRecord.setNoColor(mono);
    
public voidsetNoOrientation(boolean orientation)
Set no orientation. ?

param
orientation Orientation.

	printSetupRecord.setNoOrientation(orientation);
    
public voidsetNotes(boolean printnotes)
Print the include notes

param
printnotes print the notes

	printSetupRecord.setNotes(printnotes);
    
public voidsetOptions(short options)
Sets the options flags. Not advisable to do it directly.

param
options The bit flags for the options

	printSetupRecord.setOptions(options);
    
public voidsetPageStart(short start)
Set the page numbering start.

param
start the page numbering start

	printSetupRecord.setPageStart(start);
    
public voidsetPaperSize(short size)
Set the paper size.

param
size the paper size.

	printSetupRecord.setPaperSize(size);
    
public voidsetScale(short scale)
Set the scale.

param
scale the scale to use

	printSetupRecord.setScale(scale);
    
public voidsetUsePage(boolean page)
Set whether to use page start

param
page Use page start

	printSetupRecord.setUsePage(page);
    
public voidsetVResolution(short resolution)
Sets the vertical resolution.

param
resolution vertical resolution

	printSetupRecord.setVResolution(resolution);
    
public voidsetValidSettings(boolean valid)
Valid settings. I'm not for sure.

param
valid Valid

	printSetupRecord.setValidSettings(valid);