Foxit pdf SDK for Android

Creating, viewing and editing PDF files on Android devices has never been easier than with our modern, easy-to-use PDF SDK for Android. Alongside Foxit’s powerful Core API, our built-in UI Extension component helps to ship products quickly, even if your team of developers has limited knowledge of PDF. Powered by Fx Core™ technology, PDF SDK for Android has never been as fast or precise as it is now.


Using Android Studio developers can use our Android PDF SDK in a variety of languages such as Java, Kotlin or C++. With JavaScript you can use our Cordova or React Native binding libraries for more native development. Foxit provides all the essentials for an Android developer to use our technology with ease. Simply put, our core API makes our product easily accessible for developers of all levels and experience.

Android PDF SDK


PDF Page View Android
Ink Signatures Android
Form filling Android

PDF Viewing

Our core API provides for high-fidelity rendering of PDF documents with optimized performance for Android and other mobile platforms.

Digital Signature

Use ink signatures to let customers sign documents in their android device. No need to print a file to sign again!

PDF Forms

Give users the ability to fill out digital forms on the go with their android device. Mobile apps have never been more productive!

PDF Password Android
Strikeout annotation
Full Text Search

Rights Management

Our Android PDF SDK can generate secure PDFs with native encryption/decryption or integrate with customized DRM or IRM security systems. Our technology integrates with Microsoft RMS.

PDF Annotations

Our Android PDF SDK provides full support for annotating and marking up content with an extensive range of functions for creating, editing or importing/exporting annotations.

Full-Text Search

Fast full-text search for any PDF document, language, or encoding type. The SQLite-based full-text search delivers near-instant results, even for repositories on any Android device.


Foxit’s first release of 2021 comes with lots of new features and upgrades to our web-based JavaScript web viewer, desktop SDK and mobile SDK.

On the Web SDK side of things, we’ve added a collaboration feature meaning you can now connect multiple clients through a server, webservice or network to the same PDF. Add annotations to a shared file and collaborate in real time with your team for even more efficient document workflows. We’ve also added PDF portfolio support for viewing and downloading PDFs, lots of new form field options as well as major performance enhancements for files with large quantities of annotations.

For our desktop SDK, we’ve added some new APIs to set a DPI limit for image compression, added portfolio support as per the Web SDK above, extended our HTML to PDF conversion to include Linux, along with .TXT to PDF support.

When it comes to mobile, we’ve enhanced the performance of documents containing static XFA forms as well as made improvements to annotation counting, zoom rendering and much more!



XFA Forms are XML-based forms wrapped inside a PDF. Securely capture, present, move, process, output, update & print information associated with static & dynamic XFA forms. Simplify your data sharing, transportation & availability with XFA.


Keep PDF documents secure by connecting your application & files to Microsoft's Rights Management Services platform natively. Foxit PDF SDK also integrates with your IRM & DRM solution.


XFA Forms are XML-based forms wrapped inside a PDF. Securely capture, present, move, process, output, update and print information associated with static and dynamic XFA forms. Simplify your data sharing, transportation and availability with XFA.

Rights Management

Keep your PDF documents secure by connecting your application and files to Microsoft’s Rights Management Services platform natively. Foxit PDF SDK also integrates with your IRM and DRM solution.


Programmatically search and sensor sensitive information in your documents for legal or security purposes to keep your customer and employee information safe. Click here to see how you can achieve full GDPR-compliance.


Our Android PDF Reader is built with our PDF SDK for Android and free to download from the Google Play Store. 


Native UI

Our Android PDF SDK is built with developers in mind. We provide a built-in PDF viewer which will half your development while allowing you to customize your viewer to your requirements and brand.


Our Android PDF library is fully compliant with Google’s policies for app developers using third-party components, meaning your apps will be approved on Play Store faster. Foxit PDF SDK for Android 6.x offers 64-bit support, which is mandatory starting August 1st, 2019.

Device agnostic

Anything from smart watches, to phones, to Chromebooks, to even cars – Foxit PDF SDK renders documents inside your application just like you expected them.

Powered by Foxit's Core Technology

The core technology of Foxit PDF SDK has been around for years and is trusted by a large number of well-known companies. Foxit’s powerful engine makes document viewing fast and consistent across all platforms.


  • Android 4.x or newer
  • 32/64-bit ARM (armeabi-v7a/arm64-v8a) or 32-bit Intel x86 CPU

Sample Code in Android Studio

public class Outline {
    private String mFilePath = "";
    private Context mContext = null;
    private static int index = 0;

    public Outline(Context context, String pdfFilePath) {
        mFilePath = pdfFilePath;
        mContext = context;

    public void modifyOutline() {
        int indexPdf = mFilePath.lastIndexOf(".");
        int indexSep = mFilePath.lastIndexOf("/");

        String filenameWithoutPdf = mFilePath.substring(indexSep + 1, indexPdf);
        String outputFilePath = Common.GetOutputFilesFolder(Common.outlineModuleName) + filenameWithoutPdf + "_edit.pdf";

        PDFDoc doc = null;
        doc = Common.loadPDFDoc(mContext, mFilePath, null);
        if (doc == null) {
        try {
            Bookmark bookmarkRoot = doc.getRootBookmark();
            if (bookmarkRoot == null) {

            Bookmark firstChild = bookmarkRoot.getFirstChild();

            if (false == doc.saveAs(outputFilePath, PDFDoc.e_SaveFlagNormal)) {
                Toast.makeText(mContext, "Save document error!", Toast.LENGTH_LONG).show();
        } catch (PDFException e) {
            Toast.makeText(mContext, "Outline demo run error. " + e.getMessage(), Toast.LENGTH_LONG).show();
        } finally {
            Common.releaseDoc(mContext, doc);
        Toast.makeText(mContext, Common.runSuccesssInfo + outputFilePath, Toast.LENGTH_LONG).show();

    private void modifyOutline(Bookmark bookmark) {
        try {
            if (bookmark.isEmpty())

            if (index % 2 == 0) {
            } else {

            bookmark.setTitle("foxitbookmark" + index);

            //Traverse the brother nodes and modify their appearance and titles.
            Bookmark nextSibling = bookmark.getNextSibling();

            //Traverse the children nodes and modify their appearance and titles.
            Bookmark child = bookmark.getFirstChild();

        } catch (PDFException e) {
            Toast.makeText(mContext, "Outline demo run error. " + e.getMessage(), Toast.LENGTH_LONG).show();
public class Render {
    private Context mContext = null;
    private String mPath = null;

    public Render(Context context, String path) {
        mContext = context;
        mPath = path;

    public void renderPage(int index) {
        PDFDoc doc = Common.loadPDFDoc(mContext, mPath, null);
        if (doc == null) return;

        try {
            int pageCount = doc.getPageCount();
            if (index > pageCount || index < 0) {
                Toast.makeText(mContext, String.format("The page index is out of range!"), Toast.LENGTH_LONG).show();

            String name = mPath.substring(mPath.lastIndexOf("/") + 1, mPath.lastIndexOf("."));
            String outputFilePath = String.format("%s_index_%d.jpg", Common.GetOutputFilesFolder(Common.renderModuleName).concat(name), index);
            PDFPage pdfPage = Common.loadPage(mContext, doc, index, PDFPage.e_ParsePageNormal);
            if (pdfPage == null) {

            //Create the bitmap and erase its background.
            Bitmap bitmap = Bitmap.createBitmap((int) pdfPage.getWidth(), (int) pdfPage.getHeight(), Bitmap.Config.ARGB_8888);

            //If the page has transparency, the bitmap should be erased "Color.TRANSPARENT".
            if (pdfPage.hasTransparency()){
            else {

            Matrix2D matrix = pdfPage.getDisplayMatrix(0, 0, (int)pdfPage.getWidth(), (int)pdfPage.getHeight(), Constants.e_Rotation0);

            Renderer renderer = new Renderer(bitmap,true);

            //Render the page to bitmap.
            Progressive progressive = renderer.startRender(pdfPage, matrix, null);
            int state = Progressive.e_ToBeContinued;
            while (state == Progressive.e_ToBeContinued) {
                state = progressive.resume();
            if (state == Progressive.e_Error) {
                Toast.makeText(mContext, String.format("Failed to render the page No.%d failed!", index), Toast.LENGTH_LONG).show();

            //Save the render result to the jpeg image.
            if (false == Common.SaveImageFile(bitmap, Bitmap.CompressFormat.JPEG, outputFilePath)) {
                Toast.makeText(mContext, String.format("Failed to Save Image File!"), Toast.LENGTH_LONG).show();

            Toast.makeText(mContext, Common.runSuccesssInfo + outputFilePath, Toast.LENGTH_LONG).show();
        } catch (PDFException e) {
            Toast.makeText(mContext, String.format("Failed to render the page No.%d! %s", index, e.getMessage()), Toast.LENGTH_LONG).show();
        } finally {
            Common.releaseDoc(mContext, doc);