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)
- Improved Shape Rendering with Soft Clipping - August 24, 2017
- 4 Hidden Features in Java 9 - May 30, 2017
- Why HTTP/2 Client in Java 9 is important - May 23, 2017
- PDF Portfolio support added to JPedal, so what are they? - April 4, 2017
- Our Goals for the JPedal Java PDF Library SDK in 2017 - December 16, 2016