-
public interface PrintServicePrintServiceprovides methods for access to printing functions, even for applications that are running in the untrusted execution environment. Using this service, an application can submit a print job to the JNLP client. The client can then display this request to the user, and if accepted, queue the request to the printer.- Since:
- 1.4.2
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PageFormatgetDefaultPage()Creates a new PageFormat instance and sets it to the default size and orientation.booleanprint(Pageable document)Prints a document using the givenPageableobjectbooleanprint(Printable painter)Prints a document using the givenPrintableobjectPageFormatshowPageFormatDialog(PageFormat page)Displays a dialog that allows modification of aPageFormatinstance.
-
-
-
Method Detail
-
getDefaultPage
PageFormat getDefaultPage()
Creates a new PageFormat instance and sets it to the default size and orientation.- Returns:
- a
PageFormatset to the default size and orientation.
-
showPageFormatDialog
PageFormat showPageFormatDialog(PageFormat page)
Displays a dialog that allows modification of aPageFormatinstance. Thepageargument is used to initialize controls in the page setup dialog. If the user cancels the dialog then this method returns the originalpageobject unmodified. If the user okays the dialog then this method returns a newPageFormatobject with the indicated changes. In either case, the originalpageobject is not modified.- Parameters:
page- the defaultPageFormatpresented to the user for modification.- Returns:
- the original
pageobject if the dialog is cancelled; a newPageFormatobject containing the format indicated by the user if the dialog is acknowledged.
-
print
boolean print(Pageable document)
Prints a document using the givenPageableobject- Parameters:
document- the pages to be printed. It can not be null.- Returns:
trueif printing was successfull,falseotherwise.
-
print
boolean print(Printable painter)
Prints a document using the givenPrintableobject- Parameters:
painter- thePrintablecalled to render each page of the document.- Returns:
trueif printing was successfull,falseotherwise.
-
-