How to Resolve Error Rendering Page: Missing Font

When rendering a PDF document in the following Qoppa’s PDF library products: jPDFImages, jPDFPrint, jPDFProcess, jPDFViewer, jPDFNotes or jPDFEditor, you might encounter a blank page with an “Error Rendering Page” displayed in red on a page. This error happens when there is an issue with a font within the PDF document. There are 2 possible […]

Read More

Fill / Populate XFA Dynamic Form with Field Data in Java

Here is a sample Java program that can load a dynamic XFA form, fill in data from an XDP or XML file and then saved the filled form. This sample is using Qoppa’s PDF library jPDFFields. It could be simply adapted to use jPDFProcess library by replacing PDFFields with PDFDocument. import com.qoppa.pdfFields.PDFFields;   public class […]

Read More

Copying pages from one PDF to another PDF in Java

Here is a sample Java program that shows how to copy pages from one PDF document to another using Qoppa’s PDF library jPDFProcess. The sample can be adapted to work with Qoppa’s jPDFAssemble by simply replacing the class “PDFDocument” with “PDFAssemble”. In this sample, we’re copying the pages from an existing PDF to a new […]

Read More

Export PDF to PNG Image with Overprint Simulation

This Java sample below shows how to use Qoppa’s jPDFImages (or jPDFProcess) to load a PDF and export it to an image in PNG format with overprint simulation on. First, the image is rendered in CMYK profile, then converted to RGB using ColorConvertOp and finally saved as PNG (or JPEG). The resolution is set at […]

Read More

On using Java RenderingHints to smooth jagged edges on rotated images

Q: There seems to be some pixelation or resolution issue when rendering specific images in a PDF brochure. Is there anything that can be done to render these images more smoothly? A: Qoppa’s PDF libraries and components uses our own interpolation algorithm that works much better than the built-in Java algorithm well both when up-sampling […]

Read More

List of Supported JavaScript Actions in Qoppa PDF Components

Here is the list of supported actions in Qoppa’s PDF Library and Component Products. The table below lists the JavaScript actions, where they live in the PDF document and if they are supported or not.   Parent Dictionary Entry Supported/Unsupported Document Level: Names (in the Catalog dictionary) JavaScript Supported Catalog OpenAction Supported AA (additional actions […]

Read More

List of Supported JavaScript Objects / Methods / Properties in Qoppa PDF Components

Here is a list of all objects, methods and properties supported in Qoppa’s PDF Library and Component Products. This list was compiled for v2016R1. App Methods: alert beep openDoc popUpMenu popUpMenuEx response setTimeOut trustedFunction Properties: formsVersion viewerType viewerVersion Color Methods: equal Properties: black blue cyan dkGray gray green ltGray magenta red transparent white yellow Console […]

Read More

Extract Images from PDF Document using Java

Q: How can I export all the images contained in a PDF document? A: Here is a sample Java code to list all images embedded in a PDF document and save / export them using Qoppa’s jPDFProcess library. This example shows how to save the images in png format but it can simply be changed […]

Read More

List Resource Fonts in a PDF document

Q: How can I list all the resource fonts in a PDF document? A: Here is a sample Java code to list all fonts referenced in a PDF document using Qoppa’s jPDFProcess library. Some fonts may only be referenced by name and other fonts may be embedded in the document. In version v2016R1, a new […]

Read More

Rotate Pages in a PDF document using Java

This Java sample code will open a PDF and rotate each page of the document by a 180 degrees. It then prints and saved the rotated PDF document to a different file. This sample uses jPDFProcess, Qoppa’s Java PDF library to manipulate PDF documents. package jPDFProcessSamples;   import com.qoppa.pdf.PrintSettings; import com.qoppa.pdfProcess.PDFDocument; import com.qoppa.pdfProcess.PDFPage;   public […]

Read More

Create and add PDF annotations to a PDF document with jPDFProcess

Here is a sample Java program showing how to create and add annotations such as square, rubber stamp, typewriter, callout and free text to a PDF document using Qoppa’s PDF library jPDFProcess. The annotations are added to the first page of a PDF document. A first PDF is saved with all the annotations and a […]

Read More

Invalid CMAP name when rendering or printing a PDF page

Q: When opening a PDF file, I get the following error: A: You are missing cmaps.jar in your classpath which contains CMaps, used to read and display character encodings used with CJK (Chinese, Japanese, Korean) content. Download cmaps.jar   This error can happen when rendering PDF documents in Qoppa’s PDF components (jPDFViewer, jPDFNotes, jPDFEditor) or […]

Read More

Staple and Duplex options when printing PDF in Java

Q: Is it possible to specify staple & duplex options on a per-document basis with jPDFPrint? A: Yes, it is:  Java supports setting print job attributes for each print job, this is done through PrintRequestAttribute objects. jPDFPrint supports passing these attributes through. The attributes that you want to use are: javax.print.attribute.Finishings.STAPLEjavax.print.attribute.Finishings.STAPLE and javax.print.attribute.Sides.DUPLEXjavax.print.attribute.Sides.DUPLEX Here is a sample […]

Read More

Getting interactive field location information (bounds and page number)

To get PDF interactive form fields location information (including signature fields) such as dimension and page number, you will need to access the widget which is the visual representation of the field on the page. When using Qoppa’s PDF components (jPDFViewer, jPDFNotes, jPDFEditor), you can get information from the editing component. // get Acroform AcroForm […]

Read More

Adding custom properties to PDF digital signatures

Q: Is it possible to set custom properties to digital signatures using Qoppa’s PDF SDK? A: Yes, it is possible to do so using jPDFSecure, jPDFProcess or qPDF Toolkit. Adding custom property to the signature dictionary This method can be used to add additional custom properties to the signature dictionary. SigningInformation.setCustomProperty(key, value);SigningInformation.setCustomProperty(key, value); You can […]

Read More

How to hide the validation icon on signed digital signature fields

Q: Is there a way to turn off digital signature validity when rendering a PDF page in Qoppa’s PDF components and libraries? Our application will perform our own internal signature validation. A: Yes, it is possible by simply making a call to the following static method (before loading the signed PDF): PDFRenderHints.setRenderSignatureVerification(false);PDFRenderHints.setRenderSignatureVerification(false); This method sets […]

Read More

Adding a background or foreground image to a PDF page

Here is a sample Java program showing how to add background and foreground images to pages of a PDF document while still keeping all original page content as vector, i.e, the page still contain text, images and any vector drawing commands. This sample uses Qoppa’s PDF library jPDFProcess. This sample program opens a source PDF, […]

Read More

Add text content to a PDF document with Java

Here is a sample code to add text to a PDF document content using Qoppa’s Java PDF Library, jPDFProcess. import java.awt.Color; import java.awt.Font; import com.qoppa.pdfProcess.PDFDocument; import com.qoppa.pdfProcess.PDFGraphics; import com.qoppa.pdfProcess.PDFPage;   public class AddText { public static void main (String [] args) { try { // load PDF document PDFDocument pdfDoc = new PDFDocument ("C:\\myfolder\\input.pdf", null); […]

Read More

jPDFProcess v2015R2 Build Notes

v2015R2.10 – October 13 2016 JPDF-853 – Fill and do not stroke text highlight shape v2015R2.09 – August 19 2016 JPDF-839 – Make Root Page Tree Node Kids Array safe to null entry v2015R2.08 – August 11 2016 JPDF-811 – Error encountered trying to merge tag structure information due to ParentTree entry in StructTreeRoot being […]

Read More

Creating Searchable PDF from Image Files

Q: Can we convert images files into searchable PDF documents, by performing OCR, using Qoppa’s Java PDF library? A: Yes, using jPDProcess, you can do that. 1. Convert Images to PDF Pages The first step is to create a PDF from the images: // create a new PDF document PDFDocument pdfDoc = new PDFDocument(); // […]

Read More

No Tiff Writer Available Exception when Converting PDF to Tiff

Q: I am using jPDFProcess to convert PDF to TIFF and getting the following exception. How can I resolve this exception? A: You need to add the jai image libraries in the classpath. jai_imageio.jar and jai_codec.jar are jar files that contain Java’s ImageIO image encoders and decoders, needed for reading and writing JPEG 2000 and TIFF files.

Read More

PDF OCR With Multiple Languages

To call OCR with multiple languages, for instance English and French, call: com.qoppa.ocr.TessJNI.performOCR("eng+fra", myPage, 200); com.qoppa.ocr.TessJNI.performOCR("eng+fra", myPage, 200);

Read More

New Languages Supported in OCR

v2015R2 added OCR support for non-Latin and CJK languages. New Latin languages have also been added to the available list of languages. Here is a complete list of newly added OCR languages: New OCR Languages: Afrikaans Albanian – shqip Arabic – العربية Azerbaijani – azərbaycan Basque – euskara Belarusian – беларуская Bengali – বাংলা Bulgarian […]

Read More

LiveCycle Dynamic XFA Forms Support in Qoppa’s PDF Library

LiveCycle XFA forms are complex and uncommon PDF forms that are designed to be rendered dynamically from the drawing and layout information present in the XFA definition. This kind of forms are not widely supported and only a couple of vendors are able to render them. XFA Forms were deprecated in PDF 2.0 Adobe has […]

Read More