PAdES PDF Avanced Electronic Signatures Support in Qoppa PDF SDK

Does Qoppa’s PDF API support signing using “Advanced Electronic Signatures (AdES)”, as recognized by eIDAS regulation? Qoppa’s PDF library and components currently support the following digital signature types: • PKCS7 Signatures • B-B PAdES signatures • B-T PAdES signatures Qoppa’s PDF library and components currently do not support the following types of signatures (which are […]

Read More

Can a digital signature in a PDF document have multiple linked widgets?

Q: We know that standard interactive form fields can have multiple widgets associated with them. In this case, all “linked” widgets in the document will contain the same form field data & have the same appearance stream. But how about digital signature fields? Do they allow multiple widgets to be associated with them? Answer: The […]

Read More

Setting Highlight Mode for Link Annotations on a PDF Page

Starting v2020R2.05, the highlight mode for link annotations can be set using Qoppa’s PDF API jPDFProcess, jPDFNotes or jPDFEditor. There are 4 different highlight modes supported for links: Highlight Mode Inverted Highlight Mode Outline Highlight Mode Push Highlight Mode None Link link = (Link) annot; link.setHighlightMode(Link.HIGHTLIGHT_MODE_INVERT); //link.setHighlightMode(Link.HIGHTLIGHT_MODE_OUTLINE); //link.setHighlightMode(Link.HIGHTLIGHT_MODE_PUSH); //link.setHighlightMode(Link.HIGHTLIGHT_MODE_NONE);Link link = (Link) annot; link.setHighlightMode(Link.HIGHTLIGHT_MODE_INVERT); //link.setHighlightMode(Link.HIGHTLIGHT_MODE_OUTLINE); […]

Read More

Which hash algorithm is used when applying digital signatures

Qoppa’s PDF libraries components (v2020 and up) and Android PDF toolkit (v6.8 and up) use the safest hash algorithm available and supported by the PDF file version when applying digital signatures. This is priority order in which we look for hash algorithms based on the document version: PDF File Version 1.7 & up: “SHA512”, “SHA384”, […]

Read More

Checking for Form Field Flags such as Required, Read-Only, Rich Text

As of v2018R1, it is possible to get information about form field flags in Qoppa’s PDF libraries and components. These flags represent some of the field properties that can be found under the form field properties in PDF editing applications and our PDF components. Field Flags Available Interface FormField (available in all fields) FormField.FF_READONLY -The […]

Read More

Customizing PDF annotation author name per user in Qoppa PDF components

Q: When a user annotates a PDF using jPDFNotes, it seems that the author name associated with the comments is the user name from the operating system. How can I pass a different name? A: By default, jPDFNotes uses the user name as reported by the system, but you can override this by using: AnnotationTools.setDefaultAuthor(“author name”);AnnotationTools.setDefaultAuthor(“author name”); […]

Read More

File attachments handling in attachment pane in Qoppa PDF components

Qoppa’s PDF Swing components jPDFViewer, jPDFNotes and jPDFEditor have a side tab / pane that will show all file attachments that were added to a PDF document. Handling of File Attachments When double-clicking on one of the file attachment, Qoppa’s PDF components will by default handle the documents in the following way: PDF documents will […]

Read More

Scaling your Java Application for 4K High DPI Displays support on Mac, Windows, Linux

4k support in Qoppa PDF Components In version v2017R1,  support for 4K monitors was added in Qoppa PDF components jPDFViewer, jPDFNotes and jPDFEditor. The user interface was completely revised to support 4k HiDPI Display monitors with automatic DPI scaling for all dialogs and toolbars as well as newly designed vector icons that render crisp at any resolution. Customers integrating […]

Read More

Invalid colors for CMYK images when cmykProfile.jar missing in classpath

Update: As of version v2019R1, cmykProfile.jar is now packaged inside Qoppa’s library jars and no longer requires to be added to the classpath. 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, […]

Read More

Selecting an annotation on a page in Qoppa’s PDF components

Q: How can I select a given annotation on a page in jPDFViewer, jPDFNotes or jPDFEditor? A: You will need to work with the IAnnotationManager, which manages the selection cycle for annotations. IAnnotationManager annotmanager = viewerBean.getAnnotationManager();IAnnotationManager annotmanager = viewerBean.getAnnotationManager(); This interface manages the selection cycle for annotation components on a page and allows to programmatically […]

Read More

Deleting all bookmarks from a PDF document

To delete all bookmarks in a PDF document, simply create a new empty root bookmark. With jPDFProcess, use PDFDocument.createRootBookmark(); With jPDFAssemble, use PDFAssemble.createRootBookmark(); With jPDFEditor, use PDFEditorBean.getDocument().createRootBookmark(); Here is sample code to do so: // Load the document PDFDocument pdfDoc = new PDFDocument ("input.pdf", null); // Get the root bookmark, create one if necessary Bookmark […]

Read More

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

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

Changing default magnification (fit to page, fit to width, given zoom level)

To change the initial magnification settings when opening PDF documents in Qoppa’s PDF components and ignore the magnification settings contained in the PDF document (if any), make the following method calls immediately after instantiating the PDF bean, before opening any PDF document: Set a Fit To Width Magnification: Display with the page magnified just enough […]

Read More

Customizing Annotations Tools

Q: How can I customize annotations tools in jPDFNotes? A: Use the class called AnnotationTools that manages the default properties and settings for the annotation tools in Qoppa’s PDF components. Disable Flattening of Annotations AnnotationTools.setFlatteningEnabled(false);AnnotationTools.setFlatteningEnabled(false); Disable Deleting of Annotations AnnotationTools.setDeleteEnabled(false);AnnotationTools.setDeleteEnabled(false); Set Default Author for New Annotations AnnotationTools.setDefaultAuthor("John Smith");AnnotationTools.setDefaultAuthor("John Smith");

Read More

Export a given set of annotations contained in a PDF in FDF format

Here is sample Java code allowing to export a given set of annotations contained in a PDF document to an FDF file in Java. This sample is using Qoppa’s PDF component jPDFNotes. The method used is MutableDocument.exportAnnotsAsFDF: void exportAnnotsAsFDF(String fileName, Set annotSet) throws PDFException Exports annotations in FDF format. Parameters: fileName – The name of […]

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

New exception NoSuchMethodError “initSafeStandardObjects” when loading a PDF with JavaScript validation

Update: In version v2021R1, the rhino version was upgraded to rhino-1.7.13.jar. Q: I upgraded to the latest version of jPDFNotes v2016R1. I am loading a PDF that has JavaScript form field validation, but I received this error: com.qoppa.pdf.PDFException: Error loading PDF org.mozilla.javascript.Context.initSafeStandardObjects(Lorg/mozilla/javascript/ScriptableObject;Z)Lorg/mozilla/javascript/ScriptableObject; java.lang.NoSuchMethodError: org.mozilla.javascript.Context.initSafeStandardObjects(Lorg/mozilla/javascript/ScriptableObject;Z)Lorg/mozilla/javascript/ScriptableObject; A: Starting in version v2016R1, Qoppa’s PDF components started using Rhino […]

Read More

How to add your own custom annotation tools in Qoppa PDF component

Q: Can I add my own custom annotation tools to Qoppa PDF component’s toolbar? A: Yes. Qoppa PDF components jPDFNotes and jPDFEditor are fully customizable including the Annotation Toolbar. You can remove any existing tools / buttons from the annotation toolbar and add your own buttons for your own tools. This applies to jPDFNotes and […]

Read More

Customizing icon sizes in Qoppa’s PDF Components

Q: Is it possible to customize the size of the icons (to make them smaller or larger) in Qoppa’s PDF components? A: Yes, Qoppa’s components ship with 4 different icons sizes: small, medium, large and extra large. Here is a sample code showing how to adjust the size of the component’s icons: // call this […]

Read More

Touch Mode in Qoppa’s PDF components for smaller / touch-enabled screens

Qoppa’s PDF viewing components (jPDFEditor, jPDFNotes, jPDFViewer) feature a Touch Mode that makes editing and annotating PDF documents more friendly on touch screen enabled laptops, PCs and tablets such as the Windows Surface Pro, Dell Venue 11, or Lenovo Yoga 3 Pro. This feature was added in v2016R1. What are the Touch Mode Features? Enlarged […]

Read More

How to add a rubber stamp with preview to the existing stamp menu

Here is Java sample code to create a menu item that will display a preview of a rubber stamp and that can added to any JMenu. The method AnnotToolbar.createStampMenuItem to create this preview menu item was added in version v2016R1 of Qoppa’s PDF components jPDFNotes and jPDFEditor. try { // Create a menu item with […]

Read More

Remove Border around Pages in Qoppa’s PDF Components

Q: Is it possible to remove the black border around pages in Qoppa’s PDF component? See screenshot below. A: Yes, it is. See code sample below. Modifying the border we use on page view components can be done with an IPDFListener after the document is opened.  Also the documentChanged() method needs to  be overwritten to modify the […]

Read More

Submit a PDF form to a service and receiving a response back

Q: How can I submit FDF, XFDF or HTML data to a server and receive a response back? A: Here is a sample service that receive a PDF file and then responds with an FDF file. package com.qoppa.jaxrs.service.test;   import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream;   import javax.ws.rs.POST; import javax.ws.rs.Path; import javax.ws.rs.Produces; import […]

Read More