Q: Once a PDFImages object is created, is it safe to share it between threads and call com.qoppa.pdfImages.PDFImages#savePageAsJPEG method from multiple threads on single object at once? A: Yes, PDFImages was developed to be thread-safe and for the same PDFImages object, i.e, for one PDF document loaded, it is safe to call savePageAsJEG from multiple […]
All posts by admin
Monitoring time and memory used by a Java process using getThreadAllocatedBytes
A customer sent us this sample code today to monitor memory and time used by a Java thread when using our library jPDFImages to convert and save a PDF page to JPEG. This sample code can be generalized to monitor performance for any Qoppa library. This code only works for SUN JVMs. import com.qoppa.pdfImages.PDFImages; import […]
Sample servlets to work with jPDFWeb
Here is the source code of a few sample servlets that we created to work with jPDFWeb, to upload PDFs to the server, convert PDF documents to HTML on the server and then serve the HTML back to the client browser. Download rar file containing sample servlets (includes source code)
Licenses for testing, development and DR servers
Q: Do we need a license for our production environment only or do we also need licenses for our test, integration and development environments? A: For non-production environments, you can use the demo version of the library. Depending on the library, running in demo version will add a watermark to the saved document or replace […]
Spell Check in PDF Annotations and Form Fields using jOrtho
Version v2015R2 added a spell checker to Qoppa’s PDF components jPDFNotes and jPDFEditor. jOrtho Plugin and Licensing Qoppa Software has modified the jOrtho source to work with some of the custom components in PDFNotesBean / PDFEditorBean. jOrtho is a commercial library developed by Inet Software that requires licensing. I-net Software is offering a special discount […]
Retrieve your server information from within your environment
If you are trying to retrieve your server information, the easiest way is to run a simple command line on our jar file. You can follow these instructions to retrieve your server information. If you have been instructed by Qoppa’s team to retrieve your server information from within your environment by Qoppa’s team, please follow […]
Refresh issues when rendering a PDF in Android
Q: As we’re in the process of integrating your Android PDF viewer sdk into Android application, we are seeing some refresh issues with only parts of the PDF being rendered in the View. When we scroll, we see blank pages. Rotating the android device or zooming will force a refresh but we still have the […]
Android Sample Code: Flatten Annotations Using qPDF Toolkit
This is a sample program showing how to add a button for flattening all annotations on all pages in a PDF document using Qoppa’s Android annotating view, QPDFNotesView and Qoppa’s android toolkit, qPDF Toolkit. import com.qoppa.android.pdf.PDFException; import com.qoppa.android.pdfProcess.PDFDocument; import com.qoppa.notes.QPDFNotesView; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; public class FlattenActivity extends Activity […]
Definition of the jPEG2000 Quality parameter in jPDFOptimizer
Q: How is the quality parameter defined when using JPEG2000 compression in jPDFOptimizer? This is the sample code I am using to compress existing images to JPEG2000 within PDF documents using jPDFOptimizer. imageoutput.setCompression(ImageOutput.CO_JPEG2000); imageoutput.setCompressionQuality(0.8f);imageoutput.setCompression(ImageOutput.CO_JPEG2000); imageoutput.setCompressionQuality(0.8f); The quality setting for JPEG200 compression is used to calculate the data rate (bits per pixel). The range for this […]
How to set the quality parameter when optimizing PDFs using JPEG or JPEG2000 compression
Q: We are using jPDFOptimizer, your Java library to optimize PDF documents. We are getting inconsistent results when compressing using JPEG2000 with the quality parameter. Sometimes the images are well compressed with a quality of 0.8, sometimes we have to use a quality of 0.2 for what appears to be the same results. A: This […]
How to update the text on an existing rubber stamp in a PDF document
Q: We need to update an existing stamp in a PDF page and change the text on it. How can we do that using Qoppa’s Java PDF annotating component, jPDFNotes? Q: You will need to remove the existing rubber stamp and create a new stamp with the same properties but different text. The example below […]
Adding Undo / Redo functionality with shortcut keys to Qoppa’s PDF components
Q: How can I add Undo and Redo functionality to Qoppa’s PDF components jPDFNotes, jPDFEditor? The class that provides undo/redo functionality is the UndoManager. PDFNotesBean provides an implementation which can be referenced with: PDFNotesBean.getUndoManager() PDFNotesBean.getUndoManager() The methods which trigger an undo and redo, are respectively: UndoManager.undo(); UndoManager.redo();UndoManager.undo(); UndoManager.redo(); Add Undo / Redo in a Menu […]
Download Sample Android PDF Viewer
This is an implementation of an Android PDF Viewer that uses the qPDF Toolkit to render the PDF content. This viewer is intended as a starting point in the implementation of a custom viewer, the source code is provided so that it can be customized to meet the needs of the app that uses the […]
Download Qoppa PDF Android Toolkit
Download the following zip file from our website: qpdftoolkit.zip This file contains four items: version_history.txt – This text file will be updated with each new version of the toolkit. qoppapdf.jar – This is the main jar file for the toolkit. This jar file needs to be added to the classpath for your project. assets folder […]
Developing with qoppapdf.zip in Android Studio
This is the structure of QPDFSamplesViewer a sample project using qoppapdf.zip, Android Qoppa’s PDF toolkit, within Android Studio. Download qpdftoolkit.zip (containing qoppapdf.jar, libs and assets folder) Downnload qPDF_Samples_Viewer.zip Make sure that the libs folder, jniLibs folder and the assets folder are in the correct location so that they are available as resources. Make sure to add […]
Developing with qoppapdf.jar in Eclipse
Below is a structure of QPDFSamplesViewer, a sample project using qoppapdf.jar, Android Qoppa’s PDF toolkit, within Eclipse. Download qpdftoolkit.zip which includes qoppapdf.jar, libs and assets folder Download qPDF_Samples_Viewer.zip Make sure that the libs folder and the assets folder are in the correct location so that they are available as resources.
JPEG images in the PDF render with an X or do not render with the good colors
Q: I am evaluating your Android PDF Library, qPDF Toolkit and the images do not seem to display. A: qPDF Toolkit ships with a few libraries, including JPEG decoders for rendering JPEG images. They are located under the “libs” folder in the qpdftoolkit.zip file. These libraries need to be available as resources for JPEG images […]
Very slow to print a PDF document with transparency in Java
Q: We are experiencing some performance issue when printing a specific PDF with jPDFPrint. It takes a very long time to print, about 24 minutes on our Windows machine, when printing with Java 1.7. A: We looked at the document you sent. Your document was created with GPL Ghostscript and contains hundreds (if not thousands) […]
Invalid characters in SVG output due to multiple glyphs mapping to same Unicode char
Q: When I convert my document from PDF to HTML / SVG, it seems that some of the ‘e’ characters have been replaced with another accented e. A: We looked into your PDF document and we noticed that there are two glyphs mapping to the same Unicode character (lowercase e): GID 65 -> e (e […]
Unsupported features in converting PDF to SVG / HTML5
This is the current list of unsupported features in jPDFWeb as of version v2017R1: Pattern fills (Gradient fills ARE supported) Blend modes Using text as clipping path Type 3 fonts ICC color correction (Note: This can be expressed in SVG, but no browsers support it today…) No “synthesizing” of space characters between text that is […]
How to validate the license key in production?
New Validation Method (v2021 +) Validate the license key using loadLicense() Starting in version v2021, Qoppa will send you an xml file that contains your license information and you can use the loadLicense() method to verify your license. In your Java code, call the loadLicense() method from within your code before making any calls to […]
I need to use 2 Qoppa libraries / jar files in the same classpath and getting an exception
Q: I am evaluating jPDFPrint and jOfficeConvert to send both PDF and Microsoft Word documents to the printer using Java. Both jar work fine separately but when I try to include both jars in the classpath, I am getting different exceptions such as: Exception in thread “main” java.lang.IncompatibleClassChangeError: Implementing class or Exception in thread “main” […]
Selecting both tray and paper size when printing in Java
When printing in Java, it is only possible to specify one media attribute: either paper or tray. In theory, if you choose the tray then Java knows what paper size to use and the other way around. But in practice, this does not always work and there may be situations where you need to specify […]
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 […]
LittleCMS “Cannot get color transform” with Java 8
When processing images with embedded color profiles (ICC) in Java, there is a bug that causes colors to be interpreted incorrectly when running with Java 8 (and some versions of OpenJDK7) . This issue is occurring because the color management module (CMM) was switched from Sun/Kodak’s legacy CMM to the more up-to-date and open-source LittleCMS in Java 8. […]
Retrieve your server / host information
In order for us to issue a license file or license key for your server, we need more information about the server that is running the library such as library version, host names, CPU, etc.. Please follow the steps below to send us this information: 1) Open a command prompt 2) Change the directory to […]
Java PDF Library Alternative to PDFBox
If you are looking for an alternative or a complement to PDFBox, consider Qoppa’s jPDFProcess PDF library which can: Create PDFs Convert PDF to Images Print PDF Split / Merge PDFs Merge / Export PDF Form Data Extract Text from PDF Redact Text and Images OCR Secure PDF Digitally Sign PDF Linearize PDF And Much […]
REST API for PDF Processing
Interested in easily deploying PDF processes in the cloud or running PDF services? Qoppa Software’s new REST API is done just for that and allows customers to create, edit and serve PDF documents through simple REST calls. Qoppa Software REST API is comprehensive, flexible interface to our existing powerful Java API. What is REST? REST […]
Java library to verify PDF/A compliance and convert PDFs to PDF/A
Qoppa’s jPDFPreflight is a Java API for PDF/A verification and conversion to PDF/A. It provides PDF/A preflight and compliance verification as well as the ability to save / convert files in the PDF/A format. Download and try our demo application! What is PDF/A? PDF/A is a strict subset of the ISO PDF specifications which […]
Unable to start PDF Automation Server
Q: After installing PDF Automation Server and launching PAS Manager, I see a message reading “Unable to start the PDF Automation Server“. How can I fix it? A: Sometimes the QoppaPAS service will not be able to start automatically due to permissions restrictions and you will see this error message: Unable to start the PDF […]