Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Book book = new Book();
PrinterJob printJob = PrinterJob.getPrinterJob();
PageFormat pageFormat = printJob.defaultPage();
pageFormat.setOrientation(PageFormat.PORTRAIT);
Paper paper = new Paper();
Rectangle area = /*your area*/;
paper.setImageableArea(area.x, area.y, area.width, area.height);
pageFormat.setPaper(paper);
pageFormat = printJob.validatePage(pageFormat);
book.append(page, pageFormat, page.getNbPages());
printJob.setPageable(book);
try {
// - print
printJob.print();
} catch (PrinterException x) {
x.printStackTrace();
}