Print PDF Files in Java
JPedal is written in 100% Java and does not need additional platform-specific native libraries to be installed. If it runs Java 8 or above, it runs JPedal.
JPedal allows you to print PDF files in Java. Java native print support does not support printing PDF files. Which is why we've written our own and added numerous enhancements to match the capabilities in Adobe Acrobat. Just like PDF printing in Acrobat, JPedal gives complete control over the Java PDF printing process allowing you to scale, center, rotate, fit to page, print over the page, and more.
Print PDF Files from the Java PDF Viewer
JPedal allows you to print PDF files directly from the PDF Viewer. You can choose to:
- Specify the scaling, page margins and resolution
- Choose the page range
- Print in grayscale
- Choose paper source by PDF page size
Print PDF files directly from your Java code
JPedal also lets you print PDF files directly from your Java code. Java offers a generic printing solution called Java Printing Services and JPedal extends this to add print support to Java. Last time we counted there were over 50 possible PDF print combinations available in JPedal to cover every PDF printing requirement.
Documentation and Code Examples
PrintPdfPages has a simple code example for printing a PDF file from Java. We also have a tutorial for creating a more complete example which gives you greater control over how the printing takes place.