B4J Programming Press on the image to return to the main documentation page.

jFX8Print

Written by Steve Laming

List of types:

JobSettings
PageLayout
PageRange
Paper
Printer
PrinterAttributes
PrinterJob
PrintResolution

JobSettings


Events:

None

Members:


  Class_Globals As String

  GetCollation As String

  GetCopies As Int

  GetJobName As String

  GetObject As Object

  GetPageLayout As PageLayout

  GetPageRanges As PageRange

  GetPaperSource As String

  GetPrintColor As String

  GetPrintQuality As String

  GetPrintResolution As PrintResolution

  GetPrintSides As String

  Initialize As String

  IsInitialized As Boolean

  SetCollation (Collation As String) As String

  SetCopies (NCopies As Int) As String

  SetJobName (JobName As String) As String

  SetObject (Obj As Object) As String

  SetPageLayout (PageLayout As PageLayout) As String

  SetPageRanges (Pages As PageRange) As String

  SetPaperSource (Value As Object) As String

  SetPrintColor (Color As String) As String

  SetPrintQuality (Quality As String) As String

  SetPrintResolution (Resolution As Object) As String

  SetPrintSides (Sides As String) As String

  ToString As String

Members description:

Class_Globals As String
GetCollation As String
Collation determines how sheets are sorted when multiple copies of a document are printed.
One of: COLLATED,UNCOLLATED
GetCopies As Int
Get the current number of copies
GetJobName As String
Get the current job name
GetObject As Object
GetPageLayout As PageLayout
Get the current page layout for this job.
GetPageRanges As PageRange
The range of pages to print.
GetPaperSource As String
Gets the value of the property paperSource.
One of: Automatic,Bottom,Envelope,Large_Capacity,Main,Manual,Middle,Side or Top
GetPrintColor As String
Gets the value of the property printColor.
One of: COLOR, MONOCHROME
GetPrintQuality As String
Gets the value of the property printQuality.
One of: DRAFT, HIGH, LOW, NORMAL
GetPrintResolution As PrintResolution
Get the print resolution
GetPrintSides As String
If a printer supports it, then a job may be printed on both sides of the media (paper), ie duplex printing.
One of: DUPLEX, ONE_SIDED, TUMBLE
Initialize As String
Initializes the object. You can add parameters to this method if needed.
IsInitialized As Boolean
Tests whether the object has been initialized.
SetCollation (Collation As String) As String
Set the Collation property.
One of: COLLATED,UNCOLLATED
SetCopies (NCopies As Int) As String
Set the number of copies
SetJobName (JobName As String) As String
Set the job name
SetObject (Obj As Object) As String
SetPageLayout (PageLayout As PageLayout) As String
Set the PageLayout to use.
SetPageRanges (Pages As PageRange) As String
The range of pages to print as an array of PageRange.
SetPaperSource (Value As Object) As String
Sets the value of the property paperSource.
It is not possible to create a Papersource, you need to get a list of supported paper sources and select one.
  Dim P As Printer = Printer_Static.GetDefaultPrinter 'or select one from the list returned by Printer_Static.GetAllPrinters
  Dim PA As PrinterAttributes = P.GetPrinterAttributes
  Dim L As List = PA.GetSupportedPaperSources
SetPrintColor (Color As String) As String
Set the PrintColor property.
One of: COLOR, MONOCHROME
SetPrintQuality (Quality As String) As String
Set the PrintQuality property.
One of: DRAFT, HIGH, LOW, NORMAL
SetPrintSides (Sides As String) As String
Set the PrintSides property which controls duplex printing.
One of: DUPLEX, ONE_SIDED, TUMBLE
ToString As String
Returns a string representation

PageLayout


Events:

None

Members:


  Class_Globals As String

  Equals (O As Object) As Boolean

  GetBottomMargin As Double

  GetLeftMargin As Double

  GetObject As Object

  GetPageOrientation As JavaObject

  GetPaper As Paper

  GetPrintableHeight As Double

  GetPrintableWidth As Double

  GetRightMargin As Double

  GetTopMargin As Double

  Initialize As String

  IsInitialized As Boolean

  SetObject (PL As JavaObject) As String

  ToString As String

Members description:

Class_Globals As String
Equals (O As Object) As Boolean
Test of equality
GetBottomMargin As Double
Returns the bottom margin of the page layout in points.
GetLeftMargin As Double
Returns the left margin of the page layout in points.
GetObject As Object
GetPageOrientation As JavaObject
Get the Page orientation
GetPaper As Paper
The paper used.
GetPrintableHeight As Double
Returns the height dimension of the printable area of the page, in 1/72 of an inch, taking into account the orientation.
GetPrintableWidth As Double
Returns the width dimension of the printable area of the page, in 1/72 of an inch points, taking into account the orientation.
GetRightMargin As Double
Returns the right margin of the page layout in points.
GetTopMargin As Double
Returns the top margin of the page layout in points.
Initialize As String
Initializes the object. You can add parameters to this method if needed.
IsInitialized As Boolean
Tests whether the object has been initialized.
SetObject (PL As JavaObject) As String
ToString As String
Returns a String Representation ot the object

PageRange


Events:

None

Members:


  EndPage As Int

  Initialize

  IsInitialized As Boolean

  StartPage As Int

Members description:

EndPage As Int
Initialize
Initializes the fields to their default value.
IsInitialized As Boolean
Tests whether the object has been initialized.
StartPage As Int

Paper


Events:

None

Members:


  Class_Globals As String

  Equals (O As Object) As Boolean

  GetHeight As Double

  GetName As String

  GetObject As JavaObject

  GetWidth As Double

  Initialize As String

  IsInitialized As Boolean

  SetObject (Obj As JavaObject) As String

  ToString As String

Members description:

Class_Globals As String
Equals (O As Object) As Boolean
Test for equality
GetHeight As Double
Get the height of the paper in points (1/72 inch)
GetName As String
Get the paper name.
GetObject As JavaObject
GetWidth As Double
Get the width of the paper in points (1/72 inch)
Initialize As String
Initializes the object. You can add parameters to this method if needed.
IsInitialized As Boolean
Tests whether the object has been initialized.
SetObject (Obj As JavaObject) As String
ToString As String
Returns String Representation of the object

Printer


Events:

None

Members:


  Class_Globals As String

  CreatePageLayout (Paper As Paper, Orient As String, LMargin As Double, RMargin As Double, TMargin As Double, BMargin As Double) As PageLayout

  CreatePageLayout2 (Paper As Paper, Orient As String, Margin_Type As String) As PageLayout

  GetDefaultPageLayout As PageLayout

  GetName As String

  GetObject As Object

  GetPrinterAttributes As PrinterAttributes

  Initialize As String

  IsInitialized As Boolean

  SetObject (P As Object) As String

  ToString As String

Members description:

Class_Globals As String
CreatePageLayout (Paper As Paper, Orient As String, LMargin As Double, RMargin As Double, TMargin As Double, BMargin As Double) As PageLayout
Obtain a new PageLayout for this printer using the specified parameters.
Paper - The Paper To use
Orient - The orientation To use
Margins in Pts
Margins of less than 0 will cause a runtime error, Margins less than the HARDWARE_MINIMUM, will be set to that See CreatePageLayout2.
CreatePageLayout2 (Paper As Paper, Orient As String, Margin_Type As String) As PageLayout
Obtain a new PageLayout instance for this printer using the specified parameters.
Paper - The Paper To use
Orient - The orientation To use
Margin_Type the Margin_Type to use One of: DEFAULT, EQUAL, EQUAL_OPPOSITES, HARDWARE_MINIMUM
GetDefaultPageLayout As PageLayout
Return the default page layout for this Printr.
GetName As String
Return the name used by the underlying system to identify the printer to users and/or applications.
GetObject As Object
GetPrinterAttributes As PrinterAttributes
Retrieves the delegate object encapsulating the printer attributes and capabilities.
Initialize As String
Initializes the object. You can add parameters to this method if needed.
IsInitialized As Boolean
Tests whether the object has been initialized.
SetObject (P As Object) As String
ToString As String
Display String Representation

PrinterAttributes


Events:

None

Members:


  Class_Globals As String

  GetDefaultCollation As String

  GetDefaultCopies As Int

  GetDefaultPageOrientation As String

  GetDefaultPaper As Paper

  GetDefaultPaperSource As String

  GetDefaultPrintColor As String

  GetDefaultPrintQuality As String

  GetDefaultPrintResolution As PrintResolution

  GetDefaultPrintSides As String

  GetMaxCopies As Int

  GetObject As Object

  GetSupportedCollations As List

  GetSupportedPageOrientations As List

  GetSupportedPapers As List

  GetSupportedPaperSources As List

  GetSupportedPrintColors As List

  GetSupportedPrintQuality As List

  GetSupportedPrintResolutions As List

  GetSupportedPrintSides As List

  Initialize As String

  IsInitialized As Boolean

  SetObject (Obj As JavaObject) As String

  SupportsPageRanges As Boolean

Members description:

Class_Globals As String
GetDefaultCollation As String
The default collation setting.
GetDefaultCopies As Int
The default number of copies to print.
GetDefaultPageOrientation As String
Return the default orientation for paper on this printer.
One of:LANDSCAPE , PORTRAIT ,REVERSE_LANDSCAPE ,REVERSE_PORTRAIT
GetDefaultPaper As Paper
Return the default paper size used on this printer.
GetDefaultPaperSource As String
Return the default paper input source/tray/
One of: Automatic,Bottom,Envelope,Large_Capacity,Main,Manual,Middle,Side or Top
GetDefaultPrintColor As String
Get the default color setting : greyscale or color
One of: COLOR, MONOCHROME (Docs say greyscale but ENum says MONOCHROME) probably the latter, but may be either.
GetDefaultPrintQuality As String
Return the default quality setting
One of: DRAFT, HIGH, LOW, NORMAL
GetDefaultPrintResolution As PrintResolution
Return the default print resolution for paper on this printer.
GetDefaultPrintSides As String
Returns the default value for duplex settings.
One of: DUPLEX, ONE_SIDED, TUMBLE
GetMaxCopies As Int
The maximum supported number of copies.
GetObject As Object
GetSupportedCollations As List
Returns an unmodifiable set of the supported collation settings for this printer.
Possibly: COLLATED,UNCOLLATED
GetSupportedPageOrientations As List
Returns an unmodifiable set of the supported orientations for this printer.
GetSupportedPapers As List
Returns an unmodifiable set of the supported paper sizes for this printer.
GetSupportedPaperSources As List
Returns an unmodifiable set of the supported paper sources (ie input bins or trays) for this printer.
GetSupportedPrintColors As List
Returns an unmodifiable set of the supported color settings for this printer.
GetSupportedPrintQuality As List
Returns an unmodifiable set of the supported quality settings for this printer.
GetSupportedPrintResolutions As List
Returns an unmodifiable set of the supported print resolutions for this printer.
GetSupportedPrintSides As List
Returns an unmodifiable set of the supported duplex settings for this printer.
Initialize As String
Initializes the object. You can add parameters to this method if needed.
IsInitialized As Boolean
Tests whether the object has been initialized.
SetObject (Obj As JavaObject) As String
SupportsPageRanges As Boolean
Reports if page ranges are supported.

PrinterJob


Events:

None

Members:


  CancelJob As String

  Class_Globals As String

  EndJob As Boolean

  GetJobSettings As JobSettings

  GetJobStatus As String

  GetObject As Object

  GetPrinter As Printer

  Initialize As String

  IsInitialized As Boolean

  PrintPage (Node As ConcreteNodeWrapper) As Boolean

  PrintPage2 (PageLayout As PageLayout, Node As ConcreteNodeWrapper) As Boolean

  SetObject (Obj As Object) As String

  SetPrinter (Printer As Printer) As String

  ShowPageSetupDialog (Form As Form) As Boolean

  ShowPrintDialog (Form As Form) As Boolean

  ToString As String

Members description:

CancelJob As String
Cancel the underlying print job at the earliest opportunity.
Class_Globals As String
EndJob As Boolean
If the job can be successfully spooled to the printer queue this will return true.
GetJobSettings As JobSettings
The JobSettings encapsulates all the API supported job configuration options such as number of copies, collation option, duplex option, etc.
GetJobStatus As String
Obtain the current status of the job.
One of: NOT_STARTED, PRINTING, CANCELLED, DONE, ERROR
GetObject As Object
GetPrinter As Printer
Gets the printer currently associated with this job.
Initialize As String
Initializes the object. You can add parameters to this method if needed.
IsInitialized As Boolean
Tests whether the object has been initialized.
PrintPage (Node As ConcreteNodeWrapper) As Boolean
Print the specified node.
PrintPage2 (PageLayout As PageLayout, Node As ConcreteNodeWrapper) As Boolean
Print the specified node using the specified page layout.
SetObject (Obj As Object) As String
SetPrinter (Printer As Printer) As String
Change the printer for this job.
ShowPageSetupDialog (Form As Form) As Boolean
Displays a Page Setup dialog.
ShowPrintDialog (Form As Form) As Boolean
Displays a Print Dialog.
ToString As String
Display As String

PrintResolution


Events:

None

Members:


  CrossFeedResolution As Int

  FeedResolution As Int

  Initialize

  IsInitialized As Boolean

Members description:

CrossFeedResolution As Int
FeedResolution As Int
Initialize
Initializes the fields to their default value.
IsInitialized As Boolean
Tests whether the object has been initialized.
Top