Screenshot Preview

jPDFFields

經 Qoppa Software - 產品類型: 構件 / Java類

‏請注意: 除非另有說明,此為英語產品

*

Interact with and manipulate PDF forms. jPDFFields is a Java library that works with interactive PDF forms in both AcroForm and XFA formats. jPDFFields allows your application to get and set field values and can also import and export to FDF, XFDF and XDP formats. Additionally, jPDFFields can also flatten fields in a document. Flattening is the process of merging the fields into the PDF content layer so that the information is retained but as static PDF content.  jPDFFields is built on top of Qoppa's proprietary PDF technology so it is 100% Java and does not require any third party software or drivers

 *

jPDFFields Main Features

  • Load PDF documents from files, network drives, URLs or input streams.
  • Work with PDF forms in both AcroForm or XFA formats.
  • Export fields data as FDF, XML (XFDF) or XDP files.
  • Import fields data from FDF, XML (XFDF) or XDP files.
  • Flatten form fields (paint the fields content directly in the page and remove fields themselves from the PDF document).
  • Reset fields to their default value.
  • Save updated PDF file as file, an OutputStream or a ServletOutputStream.
  • Written entirely in Java - allows your application to remain platform independent.

jPDFFields - Getting Started
The starting point for using jPDFFields is the com.qoppa.pdfFields.PDFFields. This class is used to load documents into an application, work with form fields and then save the document. The class provides three constructors to load PDF files from the file system, a URL or an InputStream. All constructors take an additional parameter, an object that implements IPasswordHandler, that will be queried if the PDF file has requires a password to open. For PDF files that are not encrypted, this second parameter can be null.

jPDFFields - Extracting Data from Fields Programmatically
Once a PDFFields object has been created, the host application simply needs to call the getFields method to get the list of fields in the loaded PDF document. It is then possible to work with each field individually based on its field type to extract information and data.

jPDFFields - Exporting to FDF or XFDF
To export fields data to an FDF or XFDF file (or output stream), simply call the exportAsFDF or exportAsXFDF method in the PDFFields class. Both methods are available with a File argument or a Java OutputStream argument.

jPDFFields - Filling Fields with Data Programmatically
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 document, you need to call the save method.

jPDFFields - Importing Data from FDF or XFDF
To import data into fields from an FDF or XFDF file (or output stream), simply call the importFDF or importXFDF method in the PDFFields class. Both methods are available with a File argument or an Java InputStream argument. If you need to save the pdf document, you need to call the save method explicitly.

jPDFFields - Flattening Fields
To flatten form fields in a PDF form, simply call the flattenFields method in the PDFFields class. This will paint the content of the fields directly into the page and remove the fields themselves from the PDF document. This method takes a boolean as a parameter to indicate whether push buttons should be painted or not. Most of the time, it doesn't make sense to paint a push button once its flattened since it has no action anymore.

jPDFFields - Getting Basic Information about the PDF Document (Title, Author, etc...)
To get basic information about the loaded PDF document, you need to get the DocumentInfo class accessible through PDFFields.getDocumentInfo. From this class, you can get information about the document such as title, author, subject, keywords, etc.

jPDFFields - Distribution and JAR Files
jPDFFields is packaged in a single jar file, jPDFFields.jar that gets installed with the evaluation sample. When distributing an application that contains jPDFFields, the jPDFFields.jar file needs to be distributed along with it and needs to be included in the class path when running the application.


注意

還未完成翻譯的產品說明, 我們提供了Google 翻譯的連結方便您使用. 但請注意, 自動翻譯有時候可能會有翻譯錯誤.
由「」技術提供
在Firefox 和Opera 需要Flash.

產品搜索

輸入搜索詞:

為什麼從ComponentSource購買?

ComponentSource 提供獨特的全球國際服務, 在世界各地共有超過1,000,000 開發者客戶.

更多訊息 | 關於我們