PdfPrinterSettings
Inheritance: java.lang.Object, com.aspose.pdf.printing.PdfPrinterSettings
public class PdfPrinterSettings extends Object
Specifies information about how a document is printed, including the printer that prints it.
Constructors
| Constructor | Description |
|---|---|
| PdfPrinterSettings | Initializes a new instance of the PrinterSettings class. |
Methods
| Method | Description |
|---|---|
| canDuplex | Gets a value indicating whether the printer supports double-sided printing. |
| createMeasurementGraphics | Get Graphics2D object |
| createMeasurementGraphics | Get Graphics2D object |
| createMeasurementGraphics | Get Graphics2D object |
| createMeasurementGraphics | Get Graphics2D object |
| deepClone | Get clonned object |
| getCopies | Gets the number of copies of the document to print. |
| getDefaultPageSettings | Gets the default page settings for this printer. |
| getDuplex | Gets or sets the printer setting for double-sided printing. |
| getFromPage | Gets or sets the page number of the first page to print. |
| getInstalledPrinters | Gets the names of all printers installed on the computer. |
| getLandscapeAngle | Gets the angle, in degrees, that the portrait orientation is rotated to produce the landscape orientation. |
| getMaximumCopies | Gets the maximum number of copies that the printer enables the user to print at a time. |
| getMaximumPage | Gets or sets the maximum FromPage or ToPage that can be selected in a PrintDialog. |
| getMinimumPage | Gets or sets the minimum FromPage or ToPage that can be selected in a PrintDialog. |
| getPaperSizes | Gets the paper sizes that are supported by this printer. |
| getPaperSources | Gets the paper source trays that are available on the printer. |
| getPrinterName | Gets or sets the name of the printer to use. |
| getPrinterResolutions | Gets all the resolutions that are supported by this printer. |
| getPrinterSettings | Return PrinterSettings object |
| getPrintFileName | Gets or sets the file name, when printing to a file. |
| getPrintRange | Gets or sets the page numbers that the user has specified to be printed. |
| getSelectedPages | Gets the number of selected pages to print. |
| getToPage | Gets or sets the number of the last page to print. |
| isCollate | Gets or sets a value indicating whether the printed document is collated. |
| isDefaultPrinter | Gets a value indicating whether the PrinterName property designates the default printer, except when the user explicitly sets PrinterName. |
| isDirectPrintingSupported | Gets a value indicating whether the printer is Supported DirectPrinting |
| isDirectPrintingSupported | Gets a value indicating whether the printer is Supported DirectPrinting |
| isPlotter | Gets a value indicating whether the printer is a plotter. |
| isPrintToFile | Gets a value indicating whether the printing output is sent to a file instead of a port. |
| isSupportsColor | Gets a value indicating whether this printer supports color printing. |
| isValid | Gets a value indicating whether the PrinterName property designates a valid printer. |
| setCollate | Gets or sets a value indicating whether the printed document is collated. |
| setCopies | Sets the number of copies of the document to print. |
| setDuplex | Gets or sets the printer setting for double-sided printing. |
| setFromPage | Gets or sets the page number of the first page to print. |
| setMaximumPage | Gets or sets the maximum FromPage or ToPage that can be selected in a PrintDialog. |
| setMinimumPage | Gets or sets the minimum FromPage or ToPage that can be selected in a PrintDialog. |
| setPrinterName | Sets the name of the printer to use. |
| setPrintFileName | Sets the filename to print. |
| setPrintRange | Sets the page numbers that the user has specified to be printed. |
| setPrintToFile | Sets a value indicating whether the printing output is sent to a file instead of a port. |
| setSelectedPages | Sets the number of selected pages to print. |
| setToPage | Sets the number of the last page to print. |
PdfPrinterSettings
public PdfPrinterSettings()
Initializes a new instance of the PrinterSettings class.
canDuplex
public boolean canDuplex()
Gets a value indicating whether the printer supports double-sided printing.
Returns: boolean value
createMeasurementGraphics
public Graphics2D createMeasurementGraphics()
Get Graphics2D object
Returns: Graphics2D object
createMeasurementGraphics
public Graphics2D createMeasurementGraphics(boolean value)
Get Graphics2D object
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | boolean value |
Returns: Graphics2D object
createMeasurementGraphics
Get Graphics2D object
Returns: Graphics2D object
createMeasurementGraphics
Get Graphics2D object
Returns: Graphics2D object
deepClone
public PdfPrinterSettings deepClone()
Get clonned object
Returns: PdfPrinterSettings object
getCopies
public short getCopies()
Gets the number of copies of the document to print.
Returns: number of copies
getDefaultPageSettings
public PrintPageSettings getDefaultPageSettings()
Gets the default page settings for this printer.
Returns: default page settings
getDuplex
public int getDuplex()
Gets or sets the printer setting for double-sided printing.
Returns: int value @see DuplexKind
getFromPage
public int getFromPage()
Gets or sets the page number of the first page to print.
Returns: int value
getInstalledPrinters
public static ArrayList < String > getInstalledPrinters()
Gets the names of all printers installed on the computer.
Returns:
{@code ArrayList
getLandscapeAngle
public int getLandscapeAngle()
Gets the angle, in degrees, that the portrait orientation is rotated to produce the landscape orientation.
Returns: int value
getMaximumCopies
public int getMaximumCopies()
Gets the maximum number of copies that the printer enables the user to print at a time.
Returns: int value
getMaximumPage
public int getMaximumPage()
Gets or sets the maximum FromPage or ToPage that can be selected in a PrintDialog.
Returns: int value
getMinimumPage
public int getMinimumPage()
Gets or sets the minimum FromPage or ToPage that can be selected in a PrintDialog.
Returns: int value
getPaperSizes
public ArrayList < PrintPaperSize > getPaperSizes()
Gets the paper sizes that are supported by this printer.
Returns:
{@code ArrayList
getPaperSources
public ArrayList < PrintPaperSource > getPaperSources()
Gets the paper source trays that are available on the printer.
Returns:
{@code ArrayList
getPrinterName
public String getPrinterName()
Gets or sets the name of the printer to use.
Returns: string object
getPrinterResolutions
public com.aspose.ms.System.Drawing.Printing.PrinterSettings.PrinterResolutionCollection getPrinterResolutions()
Gets all the resolutions that are supported by this printer.
Returns: PrinterResolutionCollection object
getPrinterSettings
public com.aspose.ms.System.Drawing.Printing.PrinterSettings getPrinterSettings()
Return PrinterSettings object
Returns: PrinterSettings object
getPrintFileName
public String getPrintFileName()
Gets or sets the file name, when printing to a file.
Returns: string object
getPrintRange
public int getPrintRange()
Gets or sets the page numbers that the user has specified to be printed.
Returns: int value @see PdfPrintRange
getSelectedPages
public int[] getSelectedPages()
Gets the number of selected pages to print.
Returns: pagesList int array @see PdfPrintRange
getToPage
public int getToPage()
Gets or sets the number of the last page to print.
Returns: int value
isCollate
public boolean isCollate()
Gets or sets a value indicating whether the printed document is collated.
Returns: boolean value
isDefaultPrinter
public boolean isDefaultPrinter()
Gets a value indicating whether the PrinterName property designates the default printer, except when the user explicitly sets PrinterName.
Returns: boolean value
isDirectPrintingSupported
Gets a value indicating whether the printer is Supported DirectPrinting
isDirectPrintingSupported
Gets a value indicating whether the printer is Supported DirectPrinting
isPlotter
public boolean isPlotter()
Gets a value indicating whether the printer is a plotter.
Returns: boolean value
isPrintToFile
public boolean isPrintToFile()
Gets a value indicating whether the printing output is sent to a file instead of a port.
Returns: boolean value
isSupportsColor
public boolean isSupportsColor()
Gets a value indicating whether this printer supports color printing.
Returns: boolean value
isValid
public boolean isValid()
Gets a value indicating whether the PrinterName property designates a valid printer.
Returns: boolean value
setCollate
public void setCollate(boolean value)
Gets or sets a value indicating whether the printed document is collated.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | boolean value |
setCopies
public void setCopies(short value)
Sets the number of copies of the document to print.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | number of copies |
setDuplex
public void setDuplex(int value)
Gets or sets the printer setting for double-sided printing.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | int value @see DuplexKind |
setFromPage
public void setFromPage(int value)
Gets or sets the page number of the first page to print.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | int value |
setMaximumPage
public void setMaximumPage(int value)
Gets or sets the maximum FromPage or ToPage that can be selected in a PrintDialog.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | int value |
setMinimumPage
public void setMinimumPage(int value)
Gets or sets the minimum FromPage or ToPage that can be selected in a PrintDialog.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | int value |
setPrinterName
Sets the name of the printer to use.
setPrintFileName
Sets the filename to print.
setPrintRange
public void setPrintRange(int value)
Sets the page numbers that the user has specified to be printed.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | PdfPrintRange element @see PdfPrintRange |
setPrintToFile
public void setPrintToFile(boolean value)
Sets a value indicating whether the printing output is sent to a file instead of a port.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | boolean value |
setSelectedPages
public void setSelectedPages(int[] pagesList)
Sets the number of selected pages to print.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| pagesList | int array @see PdfPrintRange |
setToPage
public void setToPage(int value)
Sets the number of the last page to print.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | PdfPrintRange element @see PdfPrintRange |