Filling field data in a PDF form programmatically with Java

To fill in the fields with data, you can use the getField() method to get a field by field name and then use the setValue() method to set the data. To set values in combo boxes and list fields, use values from the field’s export options and not the display options. To save the PDF […]

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

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

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

How can I resolve a com.qoppa.pdf.PDFPermissionException?

Q: I am trying to flatten fields in a PDF document and I am getting a PDFPermissionException. How can I fix that error? A: Qoppa’s PDF library and component products enforce all passwords and permissions defined in the PDF specifications. No Open Password Provided If the document is password protected and you have not provided […]

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. Adobe has moved away from dynamic XFA forms and […]

Read More

jPDFFields Java API

Q: Where can I find jPDFFields javadoc API? A: You can find the API specification for the latest version of our library jPDFFields on our website at this link. jPDFFields is a java library to import and export form fields data into / from interactive PDF forms in Java.

Read More

Code Sample: Import form field data into a PDF form in Java

Simple Java program to import form field data into a PDF form from an FDF file using Qoppa’s library Java PDF form fields library jPDFFields. jPDFFields can also import XDP and XFDF data. // Load the document PDFFields pdfDoc = new PDFFields ("input.pdf", null);   // Import the data in FDF format pdfDoc.importFDF("input.fdf");   // Save the […]

Read More

Code Sample: Flatten form field data in a PDF in Java

This Java program “flattens” PDF form field data into the PDF content layer using Qoppa’s Java PDF form field library jPDFFields. This means that the field contents will become part of the PDF content and so the document will not be editable anymore. // Load the document PDFFields pdfDoc = new PDFFields ("input.pdf", null); // Flatten fields […]

Read More

Code Sample: Extract form field data programmatically from a PDF form in Java

This Java program loads a PDF document and echoes information about all the fields in the form, including field name, type, value, default value, etc… This sample uses Qoppa’s  Java PDF form fields library jPDFFields. // Load the document PDFFields pdfDoc = new PDFFields ("C:/myfolder/form04.pdf", null);   // get list of fields Vector<FormField> fields = pdfDoc.getFieldList(); […]

Read More

Code Sample: Export PDF field data to FDF in Java

Simple Java program to export PDF form field data in FDF format using Qoppa’s library jPDFFields. jPDFFields is also able to export data in XFDF and XDP formats, you can simply switch the export method to use the appropriate output format. // Load the document PDFFields pdfDoc = new PDFFields ("input.pdf", null);   // Export field data […]

Read More

JavaScript Support in Java PDF Libraries and Components

Q: Does Qoppa’s PDF library products support JavaScript? A: Yes, Qoppa’s Java PDF libraries and components do support JavaScript. How is JavaScript used in PDF documents? Mostly, JavaScript is used in interactive PDF forms in field actions to calculate the value of fields, validate field data to prevent invalid entry and format special fields such […]

Read More