public class PrinterSettingsHandle extends Object implements Handle
...
PrinterSettingsHandle printersetup = sheet.getPrinterSettings();
// Paper Size
printersetup.setPaperSize(PrinterSettingsHandle.PAPER_SIZE_LEDGER_17x11);
// Scaling
printersetup.setScale(125);
// resolution
printersetup.setResolution(300);
...
| Constructor and Description |
|---|
PrinterSettingsHandle(Boundsheet sheet)
default constructor
|
| Modifier and Type | Method and Description |
|---|---|
double |
getBottomMargin()
Gets the bottom print margin.
|
short |
getCopies()
get the number of copies to print
|
boolean |
getDraft()
get the draft quality setting
|
short |
getFitHeight()
get the number of pages to fit the printout to height
|
short |
getFitWidth()
get the number of pages to fit the printout to width
|
double |
getFooterMargin()
get the footer margin size in inches
|
double |
getHeaderMargin()
get the header margin size in inches
|
boolean |
getLandscape()
get the landscape orientation
|
double |
getLeftMargin()
Gets the left print margin.
|
boolean |
getLeftToRight()
get the left-to-right print orientation
|
boolean |
getNoColor()
get whether printing is in black and white
|
boolean |
getNoOrient()
get whether to ignore orientation
|
boolean |
getNoPrintData()
get whether printer data is missing
|
short |
getPageStart()
get the page to start printing from
|
short |
getPaperSize()
Returns the paper size setting for the printer setup based on the
following table:
|
boolean |
getPrintNotes() |
short |
getResolution()
get the print resolution
|
double |
getRightMargin()
Gets the right print margin.
|
short |
getScale()
get the scale of the printer output in whole percentages
ie: 25 = 25%
|
String |
getTitles()
Gets the range specifying the titles printed on each page.
|
double |
getTopMargin()
Gets the top print margin.
|
boolean |
getUsePage()
use custom start page for auto numbering
|
short |
getVerticalResolution()
get the vertical print resolution
|
boolean |
isFitToPage()
Gets whether the sheet will be printed fit to some number of pages.
|
boolean |
isHCenter()
Whether the sheet should be centered horizontally.
|
boolean |
isPrintGridLines()
Whether the grid lines will be printed.
|
boolean |
isPrintRowColHeaders()
Whether the row and column headers will be printed.
|
boolean |
isVCenter()
Whether the sheet should be centered vertically.
|
void |
setBottomMargin(double value)
Sets the sheet's bottom print margin.
|
void |
setCopies(int copies) |
void |
setDraft(boolean b)
set for draft quality output
|
void |
setFitHeight(int numpages)
Set the output to print onto this number of pages high
ie: setFitHeight(10) will stretch the print out to fit 10
pages high
|
void |
setFitToPage(boolean value)
Sets whether the sheet will be printed fit to some number of pages.
|
void |
setFitWidth(int numpages)
Set the output to print onto this number of pages wide
ie: setFitWidth(10) will stretch the print out to fit 10
pages wide
|
void |
setFooterMargin(double f)
sets the footer margin in inches
|
void |
setHCenter(boolean center)
Sets whether the page should be centered horizontally.
|
void |
setHeaderMargin(double h)
sets the Header margin in inches
|
void |
setLandscape(boolean b)
set the print orientation to landscape or portrait
|
void |
setLeftMargin(double value)
Sets the sheet's left print margin.
|
void |
setLeftToRight(boolean b)
set the print orientation to left-to-right printing
|
void |
setNoColor(boolean b)
sets the output to black and white
|
void |
setPageStart(short p)
set the default page to start printing from
|
void |
setPaperSize(int p)
sets the paper size based on the paper size table
|
void |
setPrintGrid(boolean print)
Sets whether to print the grid lines.
|
void |
setPrintNotes(boolean b)
sets the whether to print cell notes
|
void |
setPrintRowColHeaders(boolean print)
Sets whether to print the row and column headers.
|
void |
setResolution(int r)
Set the output printer resolution
|
void |
setRightMargin(double value)
Sets the sheet's right print margin.
|
void |
setScale(int scale)
scale the printer output in whole percentages
ie: 25 = 25%
|
void |
setTitles(String range)
Sets the range specifying the titles printed on each page.
|
void |
setTopMargin(double value)
Sets the sheet's top print margin.
|
void |
setUsePage(boolean usePage) |
void |
setVCenter(boolean center)
Sets whether the sheet should be centered vertically.
|
void |
setVerticalResolution(short verticalResolution) |
public static final int PAPER_SIZE_UNDEFINED
public static final int PAPER_SIZE_LETTER_8_5x11
public static final int PAPER_SIZE_LETTER_SMALL
public static final int PAPER_SIZE_TABLOID_11x17
public static final int PAPER_SIZE_LEDGER_17x11
public static final int PAPER_SIZE_LEGAL_8_5x14
public static final int PAPER_SIZE_STATEMENT_5_5x8_5
public static final int PAPER_SIZE_LETTER_EXTRA_9_5Ax12
public static final int PAPER_SIZE_LEGAL_EXTRA_9_5Ax15
public static final int PAPER_SIZE_TABLOID_EXTRA_1111_16Ax18
public static final int PAPER_SIZE_A4_EXTRA_235MM_X_322MM
public static final int PAPER_SIZE_LETTER_TRANSVERSE_8_5Ax11
public static final int PAPER_SIZE_EXECUTIVE_7_QUARTER_X_10_5
public static final int PAPER_SIZE_TRANSVERSE_210MM_X_297MM
public static final int PAPER_SIZE_A3_297MM_X_420MM
public static final int PAPER_SIZE_LETTER_EXTRA_TRANSV_9_5_X_12
public static final int PAPER_SIZE_A4_210MM_X_297MM
public static final int PAPER_SIZE_SUPER_A_A4_227MM_X_356MM
public static final int PAPER_SIZE_A4_SMALL_210MM_X_297MM
public static final int PAPER_SIZE_SUPER_B_A3_305MM_X_487MM
public static final int PAPER_SIZE_A5_148MM_X_210MM
public static final int PAPER_SIZE_LETTER_PLUS
public static final int PAPER_SIZE_2_X_1211_16
public static final int PAPER_SIZE_B4_JIS_257MM_X_364MM
public static final int PAPER_SIZE_A4_PLUS_210MM_X_330MM
public static final int PAPER_SIZE_B5_JIS_182MM_X_257MM
public static final int PAPER_SIZE_A5_TRANSVERSE_148MM_X_210MM
public static final int PAPER_SIZE_FOLIO_8_5_X_13
public static final int PAPER_SIZE_B5_JIS_TRANSVERSE_182MM_X_257MM
public static final int PAPER_SIZE_QUATRO_215MM_X_275MM
public static final int PAPER_SIZE_A3_EXTRA_322MM_X_445MM
public static final int PAPER_SIZE_10Ax14_10_X_14
public static final int PAPER_SIZE_A5_EXTRA_174MM_X_235
public static final int PAPER_SIZE_11Ax17_11_X_17
public static final int PAPER_SIZE_B5_ISO_EXTRA_201MM_X_276MM
public static final int PAPER_SIZE_NOTE_8_5_X_11
public static final int PAPER_SIZE_A2_420MM_X_594MM
public static final int PAPER_SIZE_ENVELOPE_9_3_78_X_8_78
public static final int PAPER_SIZE_A3_TRANSVERSE_297MM_X_420MM
public static final int PAPER_SIZE_ENVELOPE_10_4_18_X_9_5
public static final int PAPER_SIZE_EXTRA_TRANSVERSE_322MM_X_445MM
public static final int PAPER_SIZE_ENVELOPE_11_4_5_X_10_38
public static final int PAPER_SIZE_DBL_JAP_POSTCARD_200MM_X_148MM
public static final int PAPER_SIZE_ENVELOPE_12_4_34_X_11
public static final int PAPER_SIZE_A6_105MM_X_148MM
public static final int PAPER_SIZE_ENVELOPE_14_5_X_11_5
public static final int PAPER_SIZE_C_17_X_22_72
public static final int PAPER_SIZE_D_22_X_34_73
public static final int PAPER_SIZE_E_34_X_44_74
public static final int PAPER_SIZE_DL_ENVELOPE_110MM_X_110MM_X_220MM
public static final int PAPER_SIZE_LETTER_ROTATED_11_X_8_5
public static final int PAPER_SIZE_ENVELOPE_C5_162MM_X_229M
public static final int PAPER_SIZE_A3_ROTATED_420MM_X_297MM
public static final int PAPER_SIZE_ENVELOPE_C3_324MM_X_458MM
public static final int PAPER_SIZE_A4_ROTATED_297MM_X_210MM
public static final int PAPER_SIZE_ENVELOPE_C4_229MM_X_324MM
public static final int PAPER_SIZE_A5_ROTATED_210MM_X_148MM
public static final int PAPER_SIZE_ENVELOPE_C6_115MM_X_162MM
public static final int PAPER_SIZE_ENVELOPE_C6_C5_114MM_X_229MM
public static final int PAPER_SIZE_B4_ISO_250MM_X_353MM
public static final int PAPER_SIZE_B5_ISO_176MM_X_250MM
public static final int PAPER_SIZE_DBL_JAP_POSTCARD_ROT_148MM_X_200MM
public static final int PAPER_SIZE_B6_ISO_125MM_X_176MM
public static final int PAPER_SIZE_ENVELOPE_ITALY_10MM_X_230MM
public static final int PAPER_SIZE_ENVELOPE_MONARCH_3_7_8_X_7_5
public static final int PAPER_SIZE_6_3_4_ENVELOPE_3_5_8_X_6_5
public static final int PAPER_SIZE_US_STANDARD_FANFOLD_147_8_X_11
public static final int PAPER_SIZE_GERMAN_STD_FANFOLD_8_5_X_12
public static final int PAPER_SIZE_GERMAN_LEGAL_FANFOLD_8_5_X_13
public static final int PAPER_SIZE_JAP_POSTCARD_100M_X_148MM
public static final int PAPER_SIZE_9_X_11
public static final int PAPER_SIZE_10_X_11
public static final int PAPER_SIZE_15_X_11
public static final int PAPER_SIZE_ENVELOPE_INVITE_220MM_X_220MM
public static final int PAPER_SIZE_B4_JIS_ROTATED_364MM_X_257MM
public static final int PAPER_SIZE_B5_JIS_ROTATED_257MMX_X_182MM
public static final int PAPER_SIZE_JAP_POSTCARD_ROT_148MM_X_100MM
public static final int PAPER_SIZE_A6_ROTATED_148MM_X_105MM
public static final int PAPER_SIZE_B6_JIS_128MM_X_182MM
public static final int PAPER_SIZE_B6_JIS_ROT_182MM_X_128MM
public static final int PAPER_SIZE_12_X_11
public PrinterSettingsHandle(Boundsheet sheet)
public short getCopies()
public double getFooterMargin()
public double getHeaderMargin()
public double getLeftMargin()
public double getRightMargin()
public double getTopMargin()
public double getBottomMargin()
public boolean getLandscape()
public boolean getLeftToRight()
public boolean getNoColor()
public boolean getNoOrient()
public boolean getNoPrintData()
public short getPageStart()
public short getPaperSize()
public boolean getPrintNotes()
public short getResolution()
public short getScale()
public boolean getUsePage()
public short getVerticalResolution()
public boolean isHCenter()
public boolean isVCenter()
public boolean isPrintGridLines()
public boolean isPrintRowColHeaders()
public boolean isFitToPage()
public void setDraft(boolean b)
whether - to use draft qualitypublic void setFitHeight(int numpages)
number - of pages to fit to heightpublic void setFitWidth(int numpages)
number - of pages to fit to widthpublic void setFitToPage(boolean value)
public void setFooterMargin(double f)
footer - marginpublic void setHCenter(boolean center)
public void setHeaderMargin(double h)
header - marginpublic void setLeftMargin(double value)
public void setRightMargin(double value)
public void setTopMargin(double value)
public void setBottomMargin(double value)
public void setLandscape(boolean b)
landscape - public void setLeftToRight(boolean b)
leftToRight - public void setNoColor(boolean b)
noColor - public void setPageStart(short p)
p - public void setPrintNotes(boolean b)
printNotes - whether to print Notes.public void setResolution(int r)
resolution - The resolution to set in DPI.public void setScale(int scale)
scale - The scale to set.public void setUsePage(boolean usePage)
usePage - whether to use custom Page to start printing from.public void setVerticalResolution(short verticalResolution)
verticalResolution - The vertical Resolution in DPIpublic void setCopies(int copies)
copies - The number of copies to printpublic void setPaperSize(int p)
the - paper size indexpublic boolean getDraft()
public short getFitHeight()
public short getFitWidth()
public void setVCenter(boolean center)
public void setPrintGrid(boolean print)
public void setPrintRowColHeaders(boolean print)
public String getTitles()
public void setTitles(String range)
Copyright © 2002–2019 Starter Inc.. All rights reserved.