Improving Our Java PDF Printing Examples

Java PDF PrintingRecently 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.

  1. The code examples become more uniform with each one working almost identically.
  2. The examples use the most common options and are simpler to access and understand.
  3. 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.

If you’re a first-time reader, or simply want to be notified when we post new articles and updates, you can keep up to date by social media (Twitter, Facebook and Google+) or the Blog RSS.

Related Posts:

The following two tabs change content below.
Kieran France is a programmer for IDRSolutions. He enjoys tinkering with most things including gadgets, code and electronics. He often has no idea what to write in his blog posts but tries his hardest to make them interesting and entertaining, he also makes no excuses for his odd sense of humor.
KieranF

About Kieran France

Kieran France is a programmer for IDRSolutions. He enjoys tinkering with most things including gadgets, code and electronics. He often has no idea what to write in his blog posts but tries his hardest to make them interesting and entertaining, he also makes no excuses for his odd sense of humor.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>