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

ConstructorDescription
PdfPrinterSettingsInitializes a new instance of the PrinterSettings class.

Methods

MethodDescription
canDuplexGets a value indicating whether the printer supports double-sided printing.
createMeasurementGraphicsGet Graphics2D object
createMeasurementGraphicsGet Graphics2D object
createMeasurementGraphicsGet Graphics2D object
createMeasurementGraphicsGet Graphics2D object
deepCloneGet clonned object
getCopiesGets the number of copies of the document to print.
getDefaultPageSettingsGets the default page settings for this printer.
getDuplexGets or sets the printer setting for double-sided printing.
getFromPageGets or sets the page number of the first page to print.
getInstalledPrintersGets the names of all printers installed on the computer.
getLandscapeAngleGets the angle, in degrees, that the portrait orientation is rotated to produce the landscape orientation.
getMaximumCopiesGets the maximum number of copies that the printer enables the user to print at a time.
getMaximumPageGets or sets the maximum FromPage or ToPage that can be selected in a PrintDialog.
getMinimumPageGets or sets the minimum FromPage or ToPage that can be selected in a PrintDialog.
getPaperSizesGets the paper sizes that are supported by this printer.
getPaperSourcesGets the paper source trays that are available on the printer.
getPrinterNameGets or sets the name of the printer to use.
getPrinterResolutionsGets all the resolutions that are supported by this printer.
getPrinterSettingsReturn PrinterSettings object
getPrintFileNameGets or sets the file name, when printing to a file.
getPrintRangeGets or sets the page numbers that the user has specified to be printed.
getSelectedPagesGets the number of selected pages to print.
getToPageGets or sets the number of the last page to print.
isCollateGets or sets a value indicating whether the printed document is collated.
isDefaultPrinterGets a value indicating whether the PrinterName property designates the default printer, except when the user explicitly sets PrinterName.
isDirectPrintingSupportedGets a value indicating whether the printer is Supported DirectPrinting
isDirectPrintingSupportedGets a value indicating whether the printer is Supported DirectPrinting
isPlotterGets a value indicating whether the printer is a plotter.
isPrintToFileGets a value indicating whether the printing output is sent to a file instead of a port.
isSupportsColorGets a value indicating whether this printer supports color printing.
isValidGets a value indicating whether the PrinterName property designates a valid printer.
setCollateGets or sets a value indicating whether the printed document is collated.
setCopiesSets the number of copies of the document to print.
setDuplexGets or sets the printer setting for double-sided printing.
setFromPageGets or sets the page number of the first page to print.
setMaximumPageGets or sets the maximum FromPage or ToPage that can be selected in a PrintDialog.
setMinimumPageGets or sets the minimum FromPage or ToPage that can be selected in a PrintDialog.
setPrinterNameSets the name of the printer to use.
setPrintFileNameSets the filename to print.
setPrintRangeSets the page numbers that the user has specified to be printed.
setPrintToFileSets a value indicating whether the printing output is sent to a file instead of a port.
setSelectedPagesSets the number of selected pages to print.
setToPageSets 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:

ParameterTypeDescription
valueboolean 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} object

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 } object

getPaperSources

public ArrayList < PrintPaperSource > getPaperSources()

Gets the paper source trays that are available on the printer.

Returns: {@code ArrayList } object

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:

ParameterTypeDescription
valueboolean value

setCopies

public void setCopies(short value)

Sets the number of copies of the document to print.

Parameters:

ParameterTypeDescription
valuenumber of copies

setDuplex

public void setDuplex(int value)

Gets or sets the printer setting for double-sided printing.

Parameters:

ParameterTypeDescription
valueint value @see DuplexKind

setFromPage

public void setFromPage(int value)

Gets or sets the page number of the first page to print.

Parameters:

ParameterTypeDescription
valueint value

setMaximumPage

public void setMaximumPage(int value)

Gets or sets the maximum FromPage or ToPage that can be selected in a PrintDialog.

Parameters:

ParameterTypeDescription
valueint value

setMinimumPage

public void setMinimumPage(int value)

Gets or sets the minimum FromPage or ToPage that can be selected in a PrintDialog.

Parameters:

ParameterTypeDescription
valueint 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:

ParameterTypeDescription
valuePdfPrintRange 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:

ParameterTypeDescription
valueboolean value

setSelectedPages

public void setSelectedPages(int[] pagesList)

Sets the number of selected pages to print.

Parameters:

ParameterTypeDescription
pagesListint array @see PdfPrintRange

setToPage

public void setToPage(int value)

Sets the number of the last page to print.

Parameters:

ParameterTypeDescription
valuePdfPrintRange element @see PdfPrintRange