Recently we have been updating and improving our various JPedal Java PDF Library Support Documentation and examples, during this time I have been improving our print examples. These improvements have been made for several reasons.
- The code examples become more uniform with each one working almost identically.
- The examples use the most common options and are simpler to access and understand.
- The code examples now being cleaner and simpler are good bases to build and make integrating JPedal functionality into your software much easier.
Unfortunately whilst doing this we found some of our existing examples were overly complex and needed to be altered so much that we have instead created a class to replace it with the older example. One such example is the SilentPrint example and this is the focus of this article.
With the creation of a new, simpler and easier to use print example SilentPrint was no longer required. As we know that some users may be using this example we have not just removed the class. Instead we have marked it as deprecated in favour of our new print class with a plan to remove SilentPrint at a later date.
Our new print example is called PrintPdfPages and details of the various examples that uses the print functionality can be found here.
This new example is set up and closed in the same manner as our other examples, the methods used to actually print that aren’t found in the other examples are printAllPages(String printerName) and printPage(String printerName, int page).
We understand that there are still users that will wish to handle more complex print tasks, in this case you can either use the new print example as a base to build upon or write your own print code. Writing your own print code is actually easier than it sounds, we even have a tutorial to get you started and a print FAQ that will help you in writing your own print code.
I hope you find the new print examples and the tutorials listed here just a useful if not more so than SilentPrint was before now.
Latest posts by Kieran France (see all)
- How Java 10 will improve performance - April 17, 2018
- Pros and Cons of Bitbucket Pipelines - March 15, 2018
- Off Screen Rendering Improvements to JPedal Viewer - February 2, 2018
- How to use Cipher streams in Java - January 10, 2018
- Improved Shape Rendering with Soft Clipping - August 24, 2017