This is the list of frequently asked questions for jPDFWriter. If you
don't find the answer to your question, don't hesitate to ask us at info@qoppa.com.
Licensing Questions
What is the difference between server license and 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 servers many users)
You need
to purchase 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? If we were to have a production issue, how quickly
are you able to address it?
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 any
questions that may come up, 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 18% of the purchase price per year.
Is there an expiry date for
the license?
There is no expiration on the license.
Technical Questions
Why is jPDFWriter displaying
only 4 pages of the PDF document?
The evaluation
version of the software has a 4 page limit. To get around the
4 page limit you
would have to purchase the software.
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 one of 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 product jPDFProcess.
In
what PDF format does jPDFWriter save PDF files?
jPDFWriter
saves PDF files in 1.3 format.
Do you have any sample code that takes an
html document and outputs it as a
PDF file?
We provide a static method to load HTML document
in jPDFWriter. To
create a PDF file from an HTML url, your code would look something
like:
URL
url = new URL ("http://www.somewebsite.com");
PageFormat pf = new PageFormat();
PDFDocument pdfDoc = PDFDocument.loadHTML (url, pf, true);
pdfDoc.saveDocument ("c:\\output.pdf");
A word of warning though, the library uses standard
Java classes to load and render the HTML page, specifically
HTMLEditorKit and HTMLDocument. This means that HTML support
only goes as far as Java supports it in their classes.
Can jPDFWriter be used to print
MS-Word or rtf document to PDF?
Yes, you can use jPDFWriter to do this.Take a look at the loadRTF
document method in the PDFDocument class. As for HTML support,
the library uses standard Java classes to load and render the rtf
document
(RTFEditorKit,
StyledDocument, etc).
This means that rtf support only goes as far as Java supports it
in their classes.
jPDFWriter does not do the actual rendering of the RTF
files.
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’m using your jPDFWriter library and whenever I open
a generated PDF document in Acrobat 5.0.1, I get this message: “There
was an error processing the page. There was an error while trying
to parse
an image”.
This problem happens with Acrobat Reader Version 5.0.1 only. Please upgrade
your Acrobat Reader to a latest version: 5.0.5, 5.1 or 6 and the problem
will go away.
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.
Can
jPDFWriter be used as a PrintService?
Currently, jPDFWriter does not support the PrintService
architecture, printing is done using a PrinterJob or
directly by creating pages in a document object, getting a Graphics2D
object for a page and drawing on to it.
We are planning to add support
for print services in a future version.
Does
jPDFWriter optimize (compress) PDF files?
When jPDFWriter creates PDF documents, the
output is automatically compressed.
When I am printing to a physical printer,
the print method in my Printable gets called several times. When
I am printing to jPDFWriter,
the print method only gets called once.
Why is this?
When
printing to a physical printer, the Java API can call the print
method several times, sometimes more than twice. This was
put in place to accommodate printer buffers that can not handle
a whole page at once, hence Java can send the data to the printer
one 'buffer-full' at a time. This can be very inefficient, but
it's Java.
As I understand it, your print method should draw the full page
every time that it is called. This is necessary as Java might
be using different parts of the page on different calls. The
print method should be coded to use the pageIndex value passed
into it to determine which page to draw.
jPDFWriter doesn't need to do this convoluted buffering, so
it only needs to call the print method once for every page.
As long as you draw the full page on each call, your code
should work properly for both physical printers and jPDFWriter.