This is the list of frequently asked questions for jPDFPrint. If you don’t find the answer to your question, don’t hesitate to ask us at or visit our knowledge base.

Licensing Questions

What is the difference between a server license and a distribution license?

Our library pricing has two models according to where the software is running, either on a server, or on clients’ computers.

You need to purchase a server license if the library is running on a server (one copy of the library serves many users).

You need to purchase a distribution license if the library is running on your user computer. Please contact us for distribution pricing.

What is your policy for annual support-renewal / upgrades?

When you purchase the library, 3 months of free support is included. This is normally enough to get the library integrated into your application and to work out any issues that may come up. Support includes answers to questions, priority bug fixes and free upgrades during the 3 month period.

Additionally, we also offer extended support renewable on a yearly basis. The extended support includes the same items as the initial 3 month support and is priced at 22% of the purchase price per year.

Is there an expiry date for the license?

There is no expiration date on the license.

Technical Questions

I am running jPDFPrint in an applet. How can I sign the applet?

You need to sign the jPDFPrint.jar file as well as your applet jar file with your own certificate. All jar files must be signed using the same certificate, otherwise you will get multiple dialogs when you start the applet from a browser. Please follow this link for step by step instructions to sign your applet.

What version of Acrobat PDF does jPDFPrint support?

jPDFPrint supports all PDF file versions up to 2.0, the latest version of the Adobe PDF format.

What type of fonts does jPDFPrint support?

jPDFPrint supports all fonts supported by PDF. This includes Type 0 (CID Fonts), Type 1, Type1C, Type 3 and TrueType.

How can I specify which printer to use? I would like to print to a specific printer.

Printing to a specific printer is only supported in Java 1.4 and above. Simply use the print method that takes the printer name as a parameter.

The code to print to a specific printer called “printer name” is:

PDFPrint.print(fileName, "printer name", printSettings, pwdHandler);

“printer name” is the name of the printer
fileName is the name of the PDF file
printSettings is a PrintSettings object and can be left null when using default print settings
pwdHandler is an object that implements IPasswordHandler and can be left null

Is there a way to not have the printer dialog box appear? I want to just print the file to the default printer without user interaction.

There is a print method that takes the printer name as a parameter. If you leave the printer name null, jPDFPrint will print to the default printer.

The code to print to the default printer is:

PDFPrint.print(fileName, null, printSettings, pwdHandler);

fileName is the name of the PDF file
printSettings is a PrintSettings object and can be left null when using default print settings pwdHandler is an object that implements IPasswordHandler and can be left null
pwdHandler is an object that implements IPasswordHandler and can be left null

When we call the PDFPrint.print() method, the printer’s dialog box appears. We would like to ask the user to select the printer only once and then print all the PDF documents to that printer.

When you call the print() method, jPDFPrint creates a new PrinterJob and then calls the printDialog() to have the user choose a printer. If you don’t want this, you can create your own PrinterJob, show the print dialog once and then for each PDF document, create a PDFPrint object, set it as Pageable in the PrinterJob and send it to the printer.

The code would look something like this:

PrinterJob pJob = PrinterJob.getPrinterJob();
PDFPrint pr1 = new PDFPrint (url1, pwdHandler);
pJob.setPageable (pr1.getPageable(pJob));
PDFPrint pr2 = new PDFPrint (url2, pwdHandler);
pJob.setPageable (pr2.getPageable(pJob));

We noticed during a test that the printout from jPDFPrint is a little stretched. The line spacing between two line is a little more than what Acrobat shows and prints. When printing from Acrobat, there is a print dialog that allows the user to set options such as shrinking the printout to fit the physical page, and others. By default, it will fit to page and center the output on the page. Is there a way to do the same in jPDFPrint?

In jPDFPrint, the same options are available through the use of the PrintSettings object passed to the print() method in the PDFPrint class. We printed the PDF you sent and by setting “shrinkToPage” and ” centerInPage” to true when creating the PrintSettings object, we were able to get an exact match on the printout to the one printed by Acrobat Reader:

PDFPrint pdfPrint = new PDFPrint ("c:\\Set-C-Doc-1.pdf", null);
pdfPrint.print (new PrintSettings (true, true, false, true));

How many documents can jPDFPrint print per minute?
The performance of jPDFPrint (pages per minute) is very variable as it depends heavily on the content of the pages and the printer drivers when sending to the printer. We ran some tests on a few documents and a few printers. Generally, we are sending pages at the rate of around 180 pages per minute to the printer driver. This measures the speed from the program to the printer driver. Going from the driver to the physical printer and then actually printing the pages is something that we can not measure as it completely depends on the driver and printer.

I am printing a PDF file containing both Landscape and Portrait pages. But the landscape pages are printing in portrait. Can jPDFPrint detect the orientation of the page and print it on the appropriate paper size?

When printing with jPDFPrint, your application can use a ‘PrintSettings’ object that determines some of the printing behavior. Among other settings, there is a setting to ‘auto-rotate’ the page. If this setting is on, the library will look at the size of the page in the PDF document and try to match to the size of the paper in the printer, so it will automatically switch to landscape or portrait to make the printout fit better.

If the setting is off, the library will print the page using the default printer orientation setting, or if a print dialog box was shown, it will use whatever the user sets.

Does jPDFPrint allow us to programmatically select which paper tray (source/bin) to print from? We have 3 different types of stock paper forms that will be used depending on which PDF form is being printed.

Yes, you should be able to choose the tray to print to. To do this, you will have to get your own PrinterJob, use a PDFPrint object as a Pageable and then print using the MediaTray attribute. Your code would look like that:

PDFPrint pdfPrint = new PDFPrint ("c:\\out.pdf", null);
PrinterJob pJob = PrinterJob.getPrinterJob();
pJob.setPageAble (pdfPrint.getPageable(pJob));
HashPrintRequestAttributeSet attrSet = new HashPrintRequestAttributeSet ();
attrSet.add (MediaTray.BOTTOM);
pJob.print (attrSet);

In the example, we use the bottom printer tray, but you can change this to match the appropriate media tray in your printer.

Is the jPDFPrint currently work in BSD or Linux systems? How can I select printers?

In a similar way to Windows, you will need to ‘install’ the printer in your Linux system for Java to be able to see it. There are a few different printing systems in Linux that you can use to install printers, we recommend that you use CUPS.  When we configure our printers, we normally try to use AppSocket for the Device.

After you’ve installed your printer, try printing a test page from the CUPS administration page to make sure that everything is fine. Once you’ve done this, Java should be able to see the printer i.e. it will show up under PrintServices.lookup… and using PrinterJob.getPrinterJob(). You can use the following code to verify that it shows up:

PrintService ps [] = PrinterJob.lookupPrintServices();
for (int count = 0; count < ps.length; ++count)
System.out.println (ps [count].getName());

Once the PrintService shows up, you should be able to print with jPDFPrint without any problems.

Does jPDFPrint support JPEG 2000 images?

Yes, JPEG 2000 images are supported.