logo
24.2
search
No matching documents found.
list
search
No matching documents found.
logo

Printing

Webswing implements seamless printing support, which works out of the box without any change needed in your application. Webswing generates a PDF file from the printed document and opens it in a new browser tab using default browser PDF viewer.

Printing integration handles printing using:

  • Toolkit.getDefaultToolkit().getPrintJob() method
  • PrinterJob.getPrinterJob()
  • multi paged documents
  • landscape and portrait orientation

Printing is demonstrated in Webswing Demo application with sample source code included.

isolated File System

Custom print service

Since Webswing 22.2 the print service is customizable. Please follow these steps:

  1. Implement a print service class that implements "org.webswing.ext.services.PdfService" interface included in webswing-app-toolkit project.
  2. Put JAR with the class in /extensions folder in webswing installation folder.
  3. Run application with system property -Dorg.webswing.ext.services.PdfService=com.company.CustomPdfService