When running Qoppa Java PDF library jPDFOptimizer to optimize a PDF document and reduce its file size, it is possible to get optimization results of all performed functions as an object called OptimiseResults which allows to programmatically analyze the results and/or output them to a console or to an XML file. Output Optimizer Results to […]
Before optimizing a PDF file, it can be useful to audit the PDF to identify what objects are present in the PDF (such as images, fonts, document info, bookmarks, links, content streams, etc…) and what significant is their size in the document. In v2017R1, jPDFOptimizer added an audit function to do just this. // Load […]
Qoppa’s Java PDF libraries can be used within Mule ESB to automate PDF document processes within a workflow. PDF files can be transmitted as an input stream to any of our Java libraries. Follow the detailed steps showing how to integrate Qoppa’s PDF library jPDFProcess within a Mule flow. The following PDF functions available in […]
When rendering or optimizing images with a CMYK color space (DeviceCMYK), Qoppa’s PDF libraries and components need the cmykProfile.jar to be present in the classpath. If you forget to include this jar, you will get images with “weird” colors. Faces for instance will show with more intense, bright saturated colors (such as red and blue) […]
First Release Date: August 17 2016 Version number: v2016R1 Java PDF Library: jPDFOptimizer v2016R1 Download Links Note: There may be a few API differences between this version and the previous one because Qoppa’s jPDFOptimizer library is now compiled in Java 6 and make use of Generics. It is important to bring the new jars into […]
v2015R2 Download Links v2015R2.01 – June 06 2016 jPDF-768 – Black section when compressing JPEG images with ICC color spaces or CMYK color spaces with Java 1.8 at a specific DPI v2015R2.01 also includes all fixes that made it into the build for Qoppa’s PDF engine.
Q: We are using jPDFOptimizer and converting images in PDF document to JPEG2000 format. Could you please explain why we sometimes see the following error in the log? When this happens, the outptut optimized PDF is still fine. java.lang.IllegalArgumentException: Overall target bitrate too low, given the current bit stream header overhead at jj2000.j2k.entropy.encoder.EBCOTRateAllocator.initialize(EBCOTRateAllocator.java:564) at com.sun.media.imageioimpl.plugins.jpeg2000.J2KImageWriter.write(J2KImageWriter.java:370)java.lang.IllegalArgumentException: […]
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 […]
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 […]
Sometimes you will noticed that images contained in the original PDF document were not optimized and remained as is in the output optimized PDF document. Most likely these images are inline images and Qoppa’s jPDFOptimizer library will not optimize inline images. The reason for this is found in the definition and usage recommended for inline […]
Q: Is jPDFOptimizer included in jPDFProcess? A: No, jPDFOptimizer is licensed separately from jPDFProcess.
A simple implementation of the library to open a PDF document, optimize it and save it to a new file using Qoppa’s java library jPDFOptimizer. import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import com.qoppa.pdfOptimizer.ImageHandler; import com.qoppa.pdfOptimizer.ImageInfo; import com.qoppa.pdfOptimizer.ImageOutput; import com.qoppa.pdfOptimizer.OptSettings; import com.qoppa.pdfOptimizer.PDFOptimizer; /** * * SimpleOptimize is a sample program to demonstrate the capabilities of * Qoppa’s PDF […]
Q: Where can I find jPDFOptimizer javadoc API? A: You can find the API specification for the latest version of our library jPDFOptimizer on our website at this link. jPDFOptimizer is a java library to optimize PDF documents in Java.
Qoppa’s 100% Java PDF optimizer library, jPDFOptimizer, allows to optimize the content of a PDF document. Here are some advanced optimization options to reduce the size of a PDF document. OptSettings options = new OptSettings(); // Other optimizing options options.setFlattenComments(true); options.setFlattenFields(true); options.setClearSignatures(true); options.setFlateUncompressedStreams(true); options.setMergeDuplicateFonts(true); options.setMergeDuplicateImages(true); Method Description Flatten CommentsOptSettings.setFlattenComments() Flattens all annotations including text […]
Qoppa’s 100% Java PDF optimizer library, jPDFOptimizer, allows, among other things, to remove unnecessary objects in a PDF document in order to reduce the file size. This is done using the OptSettings class. OptSettings options = new OptSettings(); // Options to remove objects options.setDiscardAltImages(true); options.setDiscardAnnotations(true); options.setDiscardBookmarks(true); options.setDiscardDocumentInfo(true); options.setDiscardFileAttachments(true); options.setDiscardFormFields(true); options.setDiscardJSActions(true); options.setDiscardLinks(true); options.setDiscardPageThumbnails(true); options.setDiscardUnusedResources(true); options.setDiscardXMPData(true);OptSettings options […]
Qoppa’s 100% Java PDF optimizer library, jPDFOptimizer, allows, among other things, to change the properties of images in a PDF document including the compression, the color space, and the DPI resolution. This is done using the ImageHandler interface and implementing the convertImage() method which allows an application to define optimization option per image or per […]
There are 2 most common reasons that you may obtain an output PDF that is bigger than the original PDF after optimization. Object Compression In a PDF document, the reference table – which is the table that indicates where each objects is located in the file – can be compressed as what is known as […]