public class DocumentPrintSettings extends Object
DocumentPrinter
component.Modifier and Type | Method and Description |
---|---|
Chromaticity |
getChromaticity()
Returns if the printing output is in color or monochrome.
|
int |
getCopies()
Returns number of copies that need to be made for the print job.
|
String |
getDefaultPrinterName()
Returns name of the default printer.
|
String |
getFileName()
Returns name of the file to which the document will be printed.
|
Finishings |
getFinishings()
Return finishing operation(s) that the printer applies for each printed
document in the job.
|
String |
getJobName()
Returns the name of the print job in the print queue.
|
MediaTray |
getMediaTray()
Returns the current media tray or bin for the print job.
|
Dimension |
getPageDimension()
Returns page dimensions.
|
Margin |
getPageMargins()
Returns current page margins.
|
Orientation |
getPageOrientation()
Returns page orientation.
|
PageAlignment |
getPagePositioning()
Returns page alignment settings.
|
PageRangeSettings |
getPageRangeSettings()
Returns page range settings.
|
PageScaling |
getPageScaling()
Returns how pages in the PDF document are scaled to fit the printer paper
size.
|
PaperSize |
getPaperSize()
Returns page size.
|
String |
getSelectedPrinter()
Returns name of current printer.
|
SheetCollate |
getSheetCollate()
Returns how media sheets of each copy of each printed document are
collated.
|
Sides |
getSides()
Returns how print-stream pages are to be imposed upon the sides of the
output medium.
|
boolean |
isAutoPageRotate()
Returns whether the printer automatically rotates the pages to suit the
current orientation of the physical printer (landscape or portrait).
|
boolean |
isPrintToFile()
Returns whether the document is set to be printed to a file.
|
void |
printToFile(boolean printToFile)
Specifies whether documents need to be printed to a file.
|
void |
setAutoPageRotate(boolean autoRotate)
Specifies whether the printer automatically rotates the pages to suit the
current orientation of the physical printer (landscape or portrait).
|
void |
setChromaticity(Chromaticity chromaticity)
Specifies printing output needs to be in color or monochrome.
|
void |
setCopies(int copies)
Sets specified number of copies for the print job.
|
void |
setCustomPaperSize(double width,
double height,
MeasurementUnit measurementUnit)
Sets specified page dimensions in specified measurement unit.
|
void |
setFileName(String printToFileName)
Sets specified name of the file to which the document will be printed.
|
void |
setFinishings(Finishings finishings)
Specifies finishing operation(s) that the printer applies for each printed
document in the job.
|
void |
setJobName(String printJobName)
Sets specified name for the print job in the print queue.
|
void |
setMediaTray(MediaTray mediaTray)
Specifies the current media tray or bin for the print job.
|
void |
setPageMargins(Margin pageMargins,
MeasurementUnit inUnits)
Sets specified page margins in specified measurement units.
|
void |
setPageOrientation(Orientation pageOrientation)
Sets specified page orientation.
|
void |
setPagePositioning(PageAlignment pageAlignment)
Sets specified page alignment settings.
|
void |
setPageScaling(PageScaling pageScaling)
Specifies how pages in the PDF document need to be scaled to fit the
printer paper size.
|
void |
setPageSize(PaperSize pageSize)
Sets specified page size.
|
void |
setSelectedPrinter(String selectedPrinterName)
Sets printer with specified name as the current printer.
|
void |
setSheetCollate(SheetCollate sheetCollate)
Specifies how media sheets of each copy of each printed document are
collated.
|
void |
setSides(Sides sides)
Specifies how print-stream pages need to be imposed upon the sides of the
output medium.
|
public void setJobName(String printJobName)
printJobName
- name for the print jobpublic String getJobName()
public void setSelectedPrinter(String selectedPrinterName) throws XDocException
selectedPrinterName
- name of the printerXDocException
- if an error occurs setting the printerpublic String getSelectedPrinter()
public void setPageSize(PaperSize pageSize)
pageSize
- page sizepublic PaperSize getPaperSize()
public void setPageOrientation(Orientation pageOrientation)
autoRotate
is set to true.)pageOrientation
- page orientationpublic Orientation getPageOrientation()
public void setCopies(int copies)
copies
- number of copiespublic int getCopies()
public void setPageScaling(PageScaling pageScaling)
pageScaling
- how pages in the PDF document need to be scaled to fit the printer
paper sizepublic PageScaling getPageScaling()
public boolean isAutoPageRotate()
public void setAutoPageRotate(boolean autoRotate)
autoRotate
- whether the printer automatically rotates the pagespublic String getDefaultPrinterName()
public void setFileName(String printToFileName)
printToFileName
- name of the print-to-file filepublic String getFileName()
public void printToFile(boolean printToFile)
printToFile
- true if documents need to be printed to a file; false if otherwisepublic boolean isPrintToFile()
public void setCustomPaperSize(double width, double height, MeasurementUnit measurementUnit) throws XDocException
width
- width of the pageheight
- height of the pagemeasurementUnit
- measurement unit in which the dimensions need to be appliedXDocException
- if an illegal value is specifiedpublic Dimension getPageDimension()
public void setPageMargins(Margin pageMargins, MeasurementUnit inUnits) throws XDocException
pageMargins
- page margins that need to be setinUnits
- measurement unit in which the margins are specifiedXDocException
- if an invalid value is specifiedpublic Margin getPageMargins()
public void setPagePositioning(PageAlignment pageAlignment)
pageAlignment
- page alignment settings that need to be appliedpublic PageAlignment getPagePositioning()
public void setMediaTray(MediaTray mediaTray)
mediaTray
- current media tray or bin for the print jobpublic MediaTray getMediaTray()
public void setChromaticity(Chromaticity chromaticity)
chromaticity
- if printing output needs to be in color or monochromepublic Chromaticity getChromaticity()
public void setSides(Sides sides)
sides
- how print-stream pages need to be imposedpublic Sides getSides()
public void setSheetCollate(SheetCollate sheetCollate)
sheetCollate
- how the sheets need to be collatedpublic SheetCollate getSheetCollate()
public Finishings getFinishings()
public void setFinishings(Finishings finishings)
finishings
- finishing operation(s)public PageRangeSettings getPageRangeSettings()