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