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

Find the first Goto page action bookmark in a PDF and go to that page

This sample uses QPDFNotesView, Qoppa’s Android PDF viewer & annotator. It loops through the bookmarks contained in a PDF document, finds the first GotoPage action contained in the document’s bookmark tree and if any and go to that page. private void goToFirstBookmark() { PDFDocument doc = notes.getDocument(); if (doc != null) { try { // […]

Read More

Setting View Mode for Android PDF Viewer QPDFViewerView

The view mode can be set at the time the QPDFViewerView is constructed. See below sample for how to set it initially, it is not possible to change it while viewing a document with our current API. If the view mode is null, QPDFViewerView.VIEW_MODE.VERTICAL_CONTINUOUS is used. package com.qoppa;   import android.app.Activity; import android.os.Bundle;   import […]

Read More

Different options to render and markup PDFs on Android and iOS

Q: What are the options to display / render PDF documents in Android using Qoppa’s PDF products? A: You may use a few of our products: PDF Automation Server: This is an easy to install server that can run on your web-server to convert PDF documents to HTML5 and serve them to any browser on […]

Read More

Extract Text from a PDF using Android Java

Sample Android program to extract text content from a PDF document as a String using Qoppa’s Android toolkit qPDF Toolkit. This program will extract the text from all pages of the PDF. //must be called before utilizing qPDF Toolkit StandardFontTF.mAssetMgr = getAssets();   //load the PDF document you want to extract text from File file […]

Read More

Loading a PDF file from RandomAccessFile or an InputStream

Q: How do you suggest we open PDF files from a USB key or removable device? When Qoppa’s PDF Android toolkit opens a PDF file, by default it uses a RandomAccessFile object and reads parts of the PDF file on-demand. The reason to do this is to preserve memory which is limited on Android. You […]

Read More

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 […]

Read More

List of JavaScript Functions Supported in qPDF Toolkit

List of JavaScript functions supported in qPDFToolkit: App Methods: alert beep Console Methods: println Doc Methods: calculateNow getField getNthFieldName Properties: calculate numFields URL Field Methods: buttonGetCaption buttonSetCaption clearItems deleteItemAt getArray getItemAt insertItemAt isBoxChecked setAction setItems Properties: borderStyle borderWidth calcOrderIndex charLimit comb commitOnSelChange currentValueIndices defaultValue delay display doc doNotScroll doNotSpellCheck editable exportValues fileSelect fillColor hidden lineWidth […]

Read More

How to remove a button from the toolbar in QPDFNotesView or QPDFViewerView

Q: How can I remove the save button from the toolbar in QPDFNotesView? A: Please see the below sample code for removing the “save” button. The relevant line of code is below: qpdfNotesView.getToolbar().removeView(qpdfNotesView.getToolbar().getIbSave());qpdfNotesView.getToolbar().removeView(qpdfNotesView.getToolbar().getIbSave()); package com.qoppa;   import android.app.Activity; import android.os.Bundle; import com.qoppa.notes.QPDFNotesView;   public class RemoveSaveButtonActivity extends Activity { public QPDFNotesView qpdfNotesView;   protected void […]

Read More

Fit to Height View when Rendering PDF with Android qPDF Toolkit

Q: How can I implement a fit to height view using Qoppa’s Android qPDF Toolkit and the PDF Viewer QPDFNotesView? A: We don’t have a predefined way of fitting the document to its height within the viewer. You can calculate the appropriate scale and set it on the viewer. See sample code below. package com.sample; […]

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

Adding custom properties to PDF digital signatures

Q: Is it possible to set custom properties to digital signatures using Qoppa’s PDF SDK? A: Yes, it is possible to do so using jPDFSecure, jPDFProcess or qPDF Toolkit. Adding custom property to the signature dictionary This method can be used to add additional custom properties to the signature dictionary. SigningInformation.setCustomProperty(key, value);SigningInformation.setCustomProperty(key, value); You can […]

Read More

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 […]

Read More

ARM and x86 Architecture Support for Android PDF library

Q: Can your Android library render PDF documents on both ARM and x86 architectures? A: Yes, our PDF android toolkit qPDF Toolkit supports both ARM and x86 architectures. When you download the toolkit, you will find a “libs” folder that contains native Android libraries. You will notice different folders for armeabi, armeabi-v7a and x86. The […]

Read More

Android View to Display / Render PDF Documents

As part of Qoppa’s Android toolkit, there is a class called QPDFViewerView, which is an extensions of FrameLayout and can be included in an app by adding as a View in an Activity. This view is a complete implementation of a PDF viewer, based on the toolkit. the intent of this class is to provide […]

Read More

Android View to Display, Annotate PDF Documents, Sign and Fill PDF forms

As part of Qoppa’s Android toolkit, there is also a class included called QPDFNotesView that extends an Android View. This class can be used within your application to show PDF documents and also provides annotation tools, similar to our qPDF Notes app. Our Android View QPDFNotesView can: Display PDF documents Review and annotate PDFs Digitally […]

Read More

Android PDF Viewer and Annotator Sample Code Using Fragment

As part of Qoppa’s Android toolkit, there is also a class included called QPDFNotesView that extends an Android View. This class can be used within your application to show PDF documents and also provides annotation tools, similar to our qPDF Notes app. Here is sample code using Qoppa’s qPDFToolkit to display and annotate a PDF […]

Read More

Refresh issues when rendering a PDF in Android

Q: As we’re in the process of integrating your Android PDF viewer sdk into Android application, we are seeing some refresh issues with only parts of the PDF being rendered in the View. When we scroll, we see blank pages. Rotating the android device or zooming will force a refresh but we still have the […]

Read More

Android Sample Code: Flatten Annotations Using qPDF Toolkit

This is a sample program showing how to add a button for flattening all annotations on all pages in a PDF document using Qoppa’s Android annotating view, QPDFNotesView and Qoppa’s android toolkit, qPDF Toolkit. import com.qoppa.android.pdf.PDFException; import com.qoppa.android.pdfProcess.PDFDocument; import com.qoppa.notes.QPDFNotesView; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; public class FlattenActivity extends Activity […]

Read More

Download Sample Android PDF Viewer

This is an implementation of an Android PDF Viewer that uses the qPDF Toolkit to render the PDF content. This viewer is intended as a starting point in the implementation of a custom viewer, the source code is provided so that it can be customized to meet the needs of the app that uses the […]

Read More

Download Qoppa PDF Android Toolkit

Download the following zip file from our website: qpdftoolkit.zip This file contains four items: version_history.txt – This text file will be updated with each new version of the toolkit. qoppapdf.jar – This is the main jar file for the toolkit. This jar file needs to be added to the classpath for your project. assets folder […]

Read More

Developing with qoppapdf.zip in Android Studio

This is the structure of QPDFSamplesViewer a sample project using qoppapdf.zip, Android Qoppa’s PDF toolkit, within Android Studio. Download qpdftoolkit.zip (containing qoppapdf.jar, libs and assets folder) Downnload qPDF_Samples_Viewer.zip Make sure that the libs folder, jniLibs folder and the assets folder are in the correct location so that they are available as resources. Make sure to add […]

Read More

Developing with qoppapdf.jar in Eclipse

Below is a structure of QPDFSamplesViewer, a sample project using qoppapdf.jar, Android Qoppa’s PDF toolkit, within Eclipse. Download qpdftoolkit.zip which includes qoppapdf.jar, libs and assets folder Download qPDF_Samples_Viewer.zip Make sure that the libs folder and the assets folder are in the correct location so that they are available as resources.

Read More

How to enable JavaScript in Qoppa Android PDF Toolkit

JavaScript is supported in Qoppa’s Android PDF toolkit, qPDF Toolkit.  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 as dates, ssn, postal codes, phone numbers, etc… JavaScript […]

Read More