Create a new folder PUT http://{host}:{port}/qoppapdf/v1/documents/mydir Upload a PDF via PUT PUT http://{host}:{port}/qoppapdf/v1/documents/mydir/mydoc.pdf Content-Type: application/pdf (PDF file in message body) Upload a PDF via POST POST http://{host}:{port}/qoppapdf/v1/documents/mydir?namingMode=1 (file as attachment) Upload an image as a PDF PUT http://{host}:{port}/qoppapdf/v1/documents/mydir/jpeg.pdf Content-Type: image/jpeg (image file in message body) Upload a Word document as a PDF PUT http://{host}:{port}/qoppapdf/v1/documents/mydir/word.pdf Content-Type: […]
All posts by admin
Opening image files (GIF, PNG, JPEG, TIFF) and converting them to PDF on the fly
Here is a sample code to open an image file in Qoppa’s Java PDF Components jPDFNotes and jPDFEditor which will convert it on the fly to PDF. The generated document can then be annotated in the component and then saved as PDF as any other PDF. pdfNotesBean = new PDFNotesBean(); try { // open a […]
Is it possible to send CAC certificates to the server for digital signature?
Q: We are developing a webserver solution which will be deployed on Internet Explorer for digitally signing PDF documents. We need to sign using the certificate on the users CAC Card. Is it possible to get the certificate from the client to the server for signature? A: If you are using a hardware device for […]
How can I save form field data from jPDFViewer?
Q: For interactive PDF forms that I have entered data to is there a way to save the PDF to the file system from Qoppa’s PDF viewing component jPDFViewer? I don’t see a save or save as button in the demo viewer. A: jPDFViewer allows to fill in form fields data and export the data […]
Getting information about the annotations contained in each page of a PDF document
Annotations are stored in a vector within each page of a PDF document. Here is sample code to loop through annotations contained in each page and output information about each annotation including annotation type, creator, date modified, color, bounds using Qoppa’s Java library jPDFProcess. This code can be adapted to work with Qoppa’s PDF components, […]
Interaction between jPDFEditor bean and jPDFProcess library to manipulate a PDF document while rendering it
jPDFEditor comes packaged with Qoppa’s jPDFProcess library, providing access to a rich API to further manipulate PDF documents programmatically. This allows to manipulate the PDF document that is currently opened while the bean receives all the user interface notifications. Here is sample code showing how to add a new “insert” button to the toolbar that […]
How to register PDF Automation Server
Registration When running in demo mode, a watermark will be added to documents upon saving them. To run in full production mode, PDF Automation Server needs to be activated with a license key. If you have not yet purchased a license you can do so by going to https://www.qoppa.com/pdfautomation/buy/ or clicking on the “Buy Now” button in the […]
Create your own pfx pkcs12 certificate to test jPDFSecure and digitally sign PDF
Here is the command line to create a pfx file with the Java keytool. This assumes that you have jdk 1.7.0_79 installed under your C:\Program Files folder. “C:\Program Files\Java\jdk1.7.0_79\bin\keytool” -genkeypair -keystore signature.pfx -storepass mypassword -storetype pkcs12 -alias myalias -dname “cn=John Smith, ou=Google, o=Google, c=US” Using the signature.pfx file generated above, you can add a digital […]
Maximum Page Size / Resolution when converting a PDF to TIFF
Q: We are trying to export a PDF to TIFF using jPDFImages and are getting a Negative Array Size Exception. What could be the issue? Sample Code: public static void testPDFToTiff() throws Exception{ PDFImages pdf = new PDFImages("C:\\mydoc.pdf", null); TIFFOptions options = new TIFFOptions(300, TIFFOptions.TIFF_CCITT_T6); pdf.saveDocumentAsTIFF("C:\\mydoc.tif", options); }public static void testPDFToTiff() throws Exception{ PDFImages pdf […]
Apply a digital signature to a PDF using a custom image appearance
This Java sample code applies a digital signature to a document with a custom appearance. The appearance of signatures can be modified in jPDFSecure to include an image, choose the fields that show or custom text. /** * Qoppa Software – Sample Source Code */ package jPDFSecureSamples; import java.awt.geom.Rectangle2D; import java.io.FileInputStream; import java.security.KeyStore; […]
v2016R1 jPDFWriter Build Notes
Below are the release notes for the v2016R1 fix branch / minor releases for Qoppa’s Free PDF Library jPDFWriter. Java PDF Library: jPDFWriter v2016R1.03 – January 04 2016 JPDF-934 – Missing content on last row in HTML to PDF Conversion due to location offset issue when creating new pages v2016R1.02 – December 14 2016 JPDF-926 […]
How to fix “Invalid xref table entry” in TeX document for PDFs generated with jPDFWriter
A user had the following issue with jPDFWriter: After generating a PDF document with jPDFWriter, he noticed that the PDF would fail when the PDF was added as a figure in a TeX document with the following error message: ** WARNING ** Invalid xref table entry [0]. PDF file is corrupted . The issue is […]
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 […]
How can I see the internal unedited structure of a PDF document?
Acrobat Preflight Tool allows to browse the internal structure of a PDF document. After starting the Preflight tool (Shift-Ctrl-X or Shift-Cmd-X on a Mac), look under the “Options” menu in the right top corner and select the menu item “Browse internal PDF structure”. This will bring up a new dialog that shows the internal structure […]
2016-09 PDF Automation Server Release
Download PDF Automation Server v2016R2 Version 2016R2 – September 2016 This version of PDF Automation Server adds two Web PDF viewers, packaged with the REST server: HTML5 PDF Viewer to simply view PDF documents HTML5 PDF Notes to view, markup, and save annotated PDF documents Try HTML5 PDF Notes Live Demo! New Features PAS-230 – New […]
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");
v2016R2 jPDFWeb Build Notes
Below are the build notes for v2016R2 Fix Branch / Minor Releases for Qoppa’s PDF Library jPDFWeb. v2016R2.0 – April 18 2016 JSVG-162 – Reuse ColorConvertOp objects across color conversions, for performance v2016R2.05 – January 24 2016 JSVG-161 – Add option to set relative size when saving a page as SVG instead of using page […]
jPDFWeb Java API
Q: Where can I find jPDFWeb javadoc API? A: You can find the API specification for the latest version of our library jPDFWeb on our website at this link. jPDFWeb is a java library to create HTML5 files / SVG from PDF documents.
jPDFPreflight Java API
Q: Where can I find jPDFPreflight javadoc API? A: You can find the API specification for the latest version of our library jPDFPreflight on our website at this link. jPDFPreflight is a java library to validate PDF documents against sub-format such as PDF/A and PDF/X as well as convert them to the sub-format.
v2016R1 jPDFPreflight Build Notes
Below are the build notes for v2016R1 Fix Branch / Minor Releases for Qoppa’s PDF Library jPDFPreflight. v2016R1.07 – May 16 2017 JPDF-986 – Add option to verification profiles to accept different PDFA version and conformance tags in the XMP metadata v2016R1.06 – November 16 2016 JPDF-896 – Missing CID Set now shows in Validation […]
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 […]
List of Supported JavaScript Events in Qoppa PDF Components
Here is the list of supported JavaScript events in Qoppa PDF Library and Component Products. Doc/Open Field/Keystroke Field/Validate Field/Calculate Field/Format Field/Focus Field/Blur Field/MouseEnter Field/MouseExit Field/MouseUp Field/MouseDown
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 […]
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 […]
Deactivating Form Filling in QPDFNotesView
Here is a sample code in Android showing how to launch QPDFNotesView and add a document listener that implements the documentOpened() method, allowing to do something each time a PDF document is open. In this sample, when a PDF is open and it is an interactive PDF form, all interactive form fields are set to […]
v2016R2 jWordConvert Release
Version: v2016R2 Release Date: August 31, 2016 PDF Library: jWordConvert This version includes all fixes and improvements added to Qoppa’s PDF parsing and rendering engine, jPDFViewer v2016R1. New Features JWOR-314 – Try & find language-script-based fonts for BiDi/CS and Far East Asia themes to avoid text shown as .notdef chars JWOR-325 – API Cleanup: Remove […]
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 […]
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 […]
Sample Signed PDF with Digital Signature from a Java Recognized Certificate Authority
Here is a sample PDF signed with a digital ID issued by GlobalSign, a certificate authority recognized by Java. blank_signed.pdf This is a blank PDF page that only contains a signed signature field. This sample PDF can be used to test digital signature validation in Java 1.7 and Java 1.8. The digital signature in this […]
2016-08 v2016R2 jPDFWeb Release
Release Version: v2016R2 Release Date: August 31, 2016 PDF Library: jPDFWeb Improvements to jPDFWeb Library JSVG-23 – Implement Gradient Fills as Images at 72 DPI JSVG-140 – Improve exception handling to redirect a more meaningful message out JSVG-142 – Fix issue “Attribute stroke redefined” for Highlight Annotations JSVG-141 – Add method to SVGOptions to pass […]