jPDFWriter FAQ

jPDFWriter FAQ

This is the list of frequently asked questions for jPDFWriter. If you don’t find the answer to your question try our knowledge base.

Licensing Questions

jPDFWriter is free to use and free to distribute under the terms of the jPDFWriter License.

Technical Questions

Does jPDFWriter optimize (compress) PDF files?

When jPDFWriter creates PDF documents, the output is automatically compressed.

Is jPDFWriter open source?

jPDFWriter’s source code is not open but the license to use the PDF library is free (including for commercial use).

Does jPDFWriter support printing of an existing PDF document to a printer?

No, jPDFWriter does not support sending an existing PDF document to a printer. jPDFWriter only allows you to create PDF files using a standard Java PrinterJob. The same code used to create the PDF document can be reused to send the output to a physical printer.

If you only wish to print existing PDF documents, you can use our other product, jPDFPrint, that handles printing only.

If you wish to modify existing PDF documents and then print them, you would use another one of our products, jPDFProcess.

Is there any way to specify a file name for the PDF without going through a dialog. My program needs to operate without any user interface.

Yes, there is a way to specify a PDF file name without going through a dialog.

After you get the PrinterJob object from PDFPrinterJob, you need to first cast it to a PDFPrinterJob and then when starting the job, instead of calling the print method with no arguments, you’ll need to call the print method with the file name as a parameter. PDFPrinterJob will not prompt for a file name when the print job is started using this method.

I am using custom fonts in my PDF content. However, I noticed that the font is not being embedded within the PDF document.

Depending on the font that you’re using, jPDFWriter will do one of two things:

If the font is a ‘known’ font, jPDFWriter will tell the PDF viewer to use that font by name. jPDFWriter recognizes dialog, dialoginput, serif, sansserif, monospaced and times new roman. These fonts should be supported by all PDF viewers.

If the font is not any of these, jPDFWriter uses Java to actually draw the characters out using vectors. When the PDF viewer reads this, there is no concept of font or text, there is only a set of vector commands. This should make the file completely system independent and should work regardless of any fonts installed in the system.

If you’re using custom fonts, jPDFWriter should be using the second case.