O'Reilly logo

Learn JavaFX 8: Building User Experience and Interfaces with Java 8 by Kishori Sharan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 30

image

Understanding the Print API

In this chapter, you will learn:

  • What the Print API is
  • How to obtain the list of available printers
  • How to get the default printer
  • How to print nodes
  • How to show the page setup and print dialog to users
  • How to customize the setting for the printer jobs
  • How to setup the page layout for printing
  • How to print webpages displayed in a WebView

What is the Printing API?

JavaFX 8 added support for printing nodes through the Print API in the javafx.print package. The API consists of the following classes and a number of enums (not listed):

  • Printer
  • PrinterAttributes
  • PrintResolution
  • PrinterJob
  • JobSettings
  • Paper
  • PaperSource ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required