Code Sample: Convert Word document to Tiff in Java

This Java program converts a Word document to a multi-page TIFF file using Qoppa’s library jOfficeConvert. import com.qoppa.pdf.TIFFOptions; import com.qoppa.office.WordDocument; public class WordToTIFF { public static void main (String [] args) { try { // Load the Word document WordDocument wd = new WordDocument ("input.doc"); // Save the document as a multi-page TIFF file wd.saveDocumentAsTIFF("output.tif", […]

Read More

Print method only called once in jPDFWriter

Q: When I am printing to a physical printer with Java, the print method in my Printable gets called several times. When I am printing using Qoppa’s library jPDFWriter to print directly to PDF from Java, the print method only gets called once. Why is this? A: When printing to a physical printer, the Java API can […]

Read More

jPDFWriter Java API

Q: Where can I find jPDFWriter javadoc API? A: You can find the API specification for the latest version of our library jPDFWriter on our website at this link. jPDFWriter is a java library to create PDF documents from Java.

Read More

How to set the blend mode to the PDFGraphics object

We have added a new method to our PDFGraphics object called setBlendMode() that takes a string as an argument (available in our beta build as of November 2011 and will be released in the next official version). The possible blend modes are defined in the PDFGraphics object as public final statics: BLEND_NORMAL, BLEND_MULTIPLY, BLEND_SCREEN, BLEND_OVERLAY, BLEND_DARKEN, BLEND_LIGHTEN, […]

Read More

How to set a font to the PDFGraphics object?

Q: How can I set a specific font to the pdf graphics in jPDFWriter? A: – There are three basic fonts that are supported by all PDF viewers that do not need to be embedded in the document, they are Helvetica, Courier and Times Roman.  To use these fonts, you should use the pre-defined objects […]

Read More

Code Sample: Draw data table to PDF document

Java program to create a PDF document from a data table using Qoppa’s Free Java PDF library jPDFWriter. The program draws the data to the document in a table form, with an optional grid. /** * Qoppa Software – Source Code Sample */ package jPDFWriterSamples;   import java.awt.Graphics; import java.awt.print.PageFormat; import java.awt.print.Printable; import java.awt.print.PrinterException; import […]

Read More

What is jPDFViewer?

jPDFViewer is PDF Reader for Java. It is a Java Swing component to view PDF documents within a Java application or a web application. jPDFViewer is just the component but it can be run in different contexts, including in a standalone desktop application as well as inside an applet inside a standard web browser. We […]

Read More

Windows XP Display Issue

There is a very rare issue of compatibility between java and certain graphics cards on Windows XP. When this happens, the PDF will display scrambled, weirdly with some part that may repeat.  We found a few forums that reported similar problems. Read this posting on Microsoft’s website. Here are a few things to try: Your best bet is to update the driver for […]

Read More

Solid Look & Feel Options for Java Swing

Q: What look and feel options do you recommend to use with Qoppa’s Swing PDF viewing components? Tested Look and Feels: We can recommend the following look and feels. They were made them available as options within our end-user PDF editor called PDF Studio which is based on our PDF components and libraries. PDF Studio is used […]

Read More

Navigating Back and Forth – Previous Next View

We’ve added a new API to our PDF viewing component for back and forth navigation (go to previous and next view). It will be released in jPDFViewer, jPDFNotes, jPDFEditor 2013R2 release scheduled for August 2013. The com.qoppa.pdfViewer.history package contains the classes that provide access to the “browsing history” of a document. This sample for navigating […]

Read More

Localization – Languages – Translated Labels for Qoppa PDF Components

jPDFViewer Localization ViewerLabels.properties can be found inside the jPDFViewer.jar file and contains the English labels for jPDFViewer. Current Languages Supported Qoppa PDF Component jPDFViewer supports 5 languages: English, German, Italian, French, Spanish. jPDFViewer uses the default locale as reported by java: Locale.getDefault() to determine what language to use. In jPDFViewer.jar file are also packaged the files […]

Read More

jPDFViewer Java API

Q: Where can I find jPDFViewer javadoc API? A: You can find the API specification for the latest version of our library jPDFViewer on our website at this link. jPDFViewer is a java bean to display PDF documents in Java applications and applets.

Read More

Inverting colors

Q: Does your PDF viewer jPDFViewer have an invert color mode? A: Yes. To invert colors when displaying a PDF using our Java component jPDFViewer, jPDFNotes or jPDFEditor, call bean.setInvertColorsMode(true); where bean is either PDFViewerBean, PDFNotesBean or PDFEditorBean. For typical documents, the display will change from “Black on White” to “White on Black”. Inverting colors […]

Read More

jPDFText Java API

Q: Where can I find jPDFText javadoc API? A: You can find the API specification for the latest version of our library jPDFText on our website at this link. jPDFText is a java library to extract text and words from PDF documents in Java.

Read More

Code Sample: Extract Words from a PDF document in Java

Java program that gets all the words in a PDF document and echoes them to the console using Qoppa’s library jPDFText. // Load the document PDFText pdfText = new PDFText ("input.pdf", null); // Get the words in the document Vector wordList = pdfText.getWords(); // Echo the words for (int wordIx = 0; wordIx < wordList.size(); […]

Read More

Code Sample: Extract Words and Position in a PDF document in Java

Java program to extract all the words in a PDF document with their bounding box (as a quadrilatral) and echoes this information to the console. The bounding box is a quadrilateral which gives information about the the location of the word on each page as well as the word’s length and height. // Load the […]

Read More

Trust Windows Store Certificates

Q: Can I read from the Windows Certificate store to get digital IDs to use as trusted Certificate Authorities (CAs)? A: By default, our libraries jPDFSecure and jPDFProcess and components jPDFNotes and jPDFEditor use the Java trusted Certificate Authorities when verifying digital signatures in PDF documents. It is possible to customize the trusted authorities through the SignatureSettings static methods. To add the Windows trusted CAs, […]

Read More

Multiple digital signatures on a PDF document

Q: I am using your Java library jPDFSecure to add 2 digital signatures to a PDF document (sign, save, sign again and save) but only the last signature shows as valid, the first signature is showing as invalid. Am I doing anything wrong? This KB entry applies to the following Java libraries and components: jPDFProcess, […]

Read More

jPDFSecure Java API

Q: Where can I find jPDFSecure javadoc API? A: You can find the API specification for the latest version of our library jPDFSecure on our website at this link. jPDFSecure is a java library to set permissions and passwords, encrypt and  digitally sign PDF documents.

Read More

Code Sample: Sign PDF Using Windows IDs

Windows maintains a certificate and digital ID store. Digital IDs in the store can come from certificate authorities, or can come from USB hardware tokens. Our Java libraries jPDFSecure, jPDFProcess and visual components jPDFNotes or jPDFEditor can apply a digital signature to a PDF document using a digital ID from the Windows certificate store. Here is sample java code showing how to retrieve […]

Read More

Code Sample: Apply digital signature to a PDF document in Java

Q: How can I add a digital signature to a document using Qoppa’s java library jPDFSecure? A: This Java program loads a document, then loads a digital ID from a PKCS#12 file, and then creates and signs a signature field on the first page of the document. // Load the document PDFSecure pdfDoc = new […]

Read More