Q: When searching text in the PDF document and the input keyboard is open on the screen, it is no longer possible to scroll all the way up to the beginning of the PDF document. A: This is actually an Android setting. When the keyboard is showing on the screen, Android will adjust the visible […]
All posts by admin
True Type Font Instructions used in CJK Fonts
Q: Does Qoppa’s PDF engine support true type font instructions when rendering CJK fonts? A: No, Qoppa’s PDF rendering engine does not support true type font instructions at the moment. What are font instructions? True type fonts sometimes have font instructions also called font hints. Font instructions can be used to: help render better some […]
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 […]
Add text content to a PDF document with Java
Here is a sample code to add text to a PDF document content using Qoppa’s Java PDF Library, jPDFProcess. import java.awt.Color; import java.awt.Font; import com.qoppa.pdfProcess.PDFDocument; import com.qoppa.pdfProcess.PDFGraphics; import com.qoppa.pdfProcess.PDFPage; public class AddText { public static void main (String [] args) { try { // load PDF document PDFDocument pdfDoc = new PDFDocument ("C:\\myfolder\\input.pdf", null); […]
Fast web view when streaming large linearized PDFs
Q: Are Qoppa products able to load large PDF documents that are linearized efficiently ver the web in order to render them fast into Qoppa’s PDF components? A: We’re almost done implementing this feature which will make it much faster to be able to display the first page of large linearized PDFs when streaming them […]
Getting notifications when PDF documents are modified in qPDF Toolkit
A: I am using QPDFNotesView within qPDF Toolkit to display, annotate and fill PDF forms in Android. Is there a mechanism that allows to be notified when a PDF document has been changed, for instance when a form field has been updated? A: Yes, this is possible by adding a DocumentListener, see sample code below. […]
jPDFProcess v2015R2 Build Notes
v2015R2.10 – October 13 2016 JPDF-853 – Fill and do not stroke text highlight shape v2015R2.09 – August 19 2016 JPDF-839 – Make Root Page Tree Node Kids Array safe to null entry v2015R2.08 – August 11 2016 JPDF-811 – Error encountered trying to merge tag structure information due to ParentTree entry in StructTreeRoot being […]
Creating Searchable PDF from Image Files
Q: Can we convert images files into searchable PDF documents, by performing OCR, using Qoppa’s Java PDF library? A: Yes, using jPDProcess, you can do that. 1. Convert Images to PDF Pages The first step is to create a PDF from the images: // create a new PDF document PDFDocument pdfDoc = new PDFDocument(); // […]
Keys events in Qoppa’s PDF components
Qoppa PDF components are implementing KeyListener and listening to key events redirected by the application. They handle key events such as Page Up, Page Down, End, Home, Escape, Up, Down, Right and Left. Read more about keyboard shortcuts in the components user guide: Using the keyboard to navigate Using CTRL + V key on the […]
Buttons and Toolbars in Qoppa’s PDF components
jPDFViewer Toolbar jPDFNotes Toolbar AlignmentToolbar AnnotPropertyToolbar jPDFEditor Toolbar
jPDFSecure v2015R2 Build Notes
v2015R2.01 – March 28 2016 JPDF-733 – Sample application used a non-public class PDFEncryption.is256(): Exception occurred during event dispatching: java.lang.NoClassDefFoundError: com/qoppa/pdf/security/PDFEncryption
jWordConvert v2016R1 Build Notes
These are the build notes for jWordConvert v2016R1. v2016R1.07 – June 22 2016 JWOR-332: Added support for Top-to-Bottom and Bottom-to-top text directions in table cells v2016R1.06 – May 25 2016 JWOR-331 – Added support for “Scheme color” property and border ln.noFill property for DrawingML shapes. v2016R1.05 – April 21 2016 JWOR-330 – Fix issue with […]
Changing thumbnail panel background
Sample code to change Thumbnail / Pages Panel background color. You need to get the thumbnail list from the thumbnail panel and set the background color on the list. PDFNotesBean = new PDFNotesBean(); pdfNotes.getThumbnailPanel().getThumbList().setBackground(Color.red);PDFNotesBean = new PDFNotesBean(); pdfNotes.getThumbnailPanel().getThumbList().setBackground(Color.red);
Font Matching Logic when converting from Word to PDF without embedding fonts
Even though a PDF with non-embedded fonts does not contain actual font data, the PDF format requires certain information from the fonts used to create the PDF file. For this reason, Qoppa’s Word to PDF conversion library, jWordConvert, needs to locate a Java system font corresponding to each Word document font for the required information. This […]
Font Matching Logic when converting Word to PDF with embedded fonts
To create a PDF with embedded fonts, a local embeddable TrueType font file has to be identified for each Word document font. In the case where a local font cannot be determined for a Word document font then jWordConvert can be supplied with a single “fallback” font file path to use instead. Here is more […]
Support multiple entries or layers in digital signature appearance stream
Update (May 2021): The PDF format cleared this up further in PDF Ref 2.0 Section 12.7.5.5 and made it clear that the appearance stream of a digital signature should be created at the time of signature: For signature fields that are visible, the appearance dictionary (AP) for the widget annotation of these fields should be […]
Extracting text content at a given location in a PDF (invoice, statement, medical record…)
When trying to automate processes, it can be necessary to identify and extract specific text strings contained in PDF documents such as invoices, statements, medical records or other business documents. Text is not structured in PDF documents so the best way to do this is done by identifying text by its location on the PDF […]
Split a PDF and email based on text contained in the PDF
This is an sample of a CustomProcess for Qoppa’s PDF Automation Server. This job takes in a PDF document, splits it into multiple 2 page PDFs, identifies text strings based on their location on the first page of each PDF and finally email the PDF to various addresses depending on the value of the text […]
Route a PDF document based on file name
Here is a sample implementation of a CustomProcess for PDF Automation Server that routes PDF documents based on their file name. If the file name contains the word ‘test’, the document is send via email. Otherwise, the document is saved to an output folder. import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.util.logging.Level; import com.qoppa.pas.api.CustomProcess; […]
Setting the option to embed fonts or not when converting Word to PDF
In version v2016R1, it is possible to customize jOfficeConvert to either embed or not embed fonts in the output PDF document converted from Microsoft Word. Option to Embed Fonts Embedding fonts is the default option in jOfficeConvert starting in version v2016R1. It is important to define a fall back font to be used in case […]
CJK Substitute Fonts on Windows, Mac and Linux
Substitute Fonts Needed When Non-Embedded When a CJK font (or any other font type) is embedded within a PDF document, Qoppa’s PDF rendering engine will use this font to render the text in the document. This guarantees that the document will render the same regardless of the operating system. When rendering a PDF document where […]
How to implement your own PDF workflow using custom processes
With PDF Automation Server v2016R1, customers are no longer limited by the predefined jobs available upon installation. Customers can create their own custom job and define their own workflow with all the flexibility provided by Java programming language. Custom jobs also give access to all the advanced PDF functions available in Qoppa’s jPDFProcess PDF library […]
Changing default annotation tool settings and behavior
Q: How can we change the default color of a text annotation? It’s always red. A: There is a package called com.qoppa.pdfNotes.settings that contains classes allowing to change the default behavior of all our annotations tools. So for instance, to set the default color for the free text annotation (also called typewriter annotation), you would […]
v2016R1 jWordConvert Release
Version v2016R1 – This is a major release for jWordConvert which adds support for embedding fonts in the converted PDF documents. Embedding the fonts guarantees that the resulting PDFs render the same on all machines regardless of the fonts installed or the OS. Previously, the converted PDFs were referencing fonts by name and could only […]
NullPointerException in Typeface.nativeCreateFromAsset
Q : I am trying to load a PDF document using Qoppa’s Android PDF toolkit and getting the following error: Caused by: java.lang.NullPointerException at android.graphics.Typeface.nativeCreateFromAsset(Native Method) at android.graphics.Typeface.createFromAsset(Typeface.java:149) at com.qoppa.android.pdfViewer.fonts.StandardFontTF.getTypeface(Unknown Source) at com.qoppa.android.pdfViewer.fonts.StandardFontTF.getFont(Unknown Source) at com.qoppa.android.pdfViewer.fonts.t.b(Unknown Source) at com.qoppa.android.pdfProcess.PDFPage.(Unknown Source) A: You need to load the font assets before using our library. //this static allows […]
Integrating a PDF viewing component into JavaFX application
Below is a sample code to integrate our PDF viewing, annotating and form filling component, jPDFNotesBean, into a JavaFX application. This sample shows 2 ways of integrating the Java bean: Frame: Display Qoppa’s PDF bean Inside a JFrame. This works well. Embedded: Display Qoppa’s PDF bean inside a Swing Node within a JavaFX Scene. There […]
Multiple glyphs mapping to same unicode when converting PDF to HTML5
In a PDF document, it is possible to have different glyphs that map to the same Unicode character. In this case, you will see different characters when you read the PDF but if you select and extract the text, the underlying character is the same. Sometimes this is justified but most often this happens because […]
2016-02 v2016R1 jPDFWeb Release
These are the release notes for jPDFWeb v2016R1. [JSVG-129] – Log unsupported features when converting PDF to HTLM5 / SVG [JSVG-119] – Support line caps style/ dashed lines for stroked paths [JSVG-125] – New option to handle the case when several glyphs map to the same Unicode character [JSVG-121] – Convert soft hyphen characters to […]
No Tiff Writer Available Exception when Converting PDF to Tiff
Q: I am using jPDFProcess to convert PDF to TIFF and getting the following exception. How can I resolve this exception? A: You need to add the jai image libraries in the classpath. jai_imageio.jar and jai_codec.jar are jar files that contain Java’s ImageIO image encoders and decoders, needed for reading and writing JPEG 2000 and TIFF files.
How to render PDFs in Android: Embeddable PDF Viewer for Android or HTML5
Q: Do you have a PDF viewer that can be integrated in an Android application? Depending on your Android application, we have 3 products that can be used to integrate a PDF viewer into an application on Android: qPDF Toolkit Qoppa’s Android toolkit contains a simple View QPDFViewerView to display PDF documents as well as […]