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.
DEVELOPING WITH OUR ANDROID PDF SDK
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.

FEATURES
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!
Rights Management
PDF Annotations
Full-Text Search
INTRODUCING FOXIT PDF SDK 7.5
Foxit’s last release of 2020 comes with lots of new features and upgrades. With our desktop SDK, we’ve extended layout recognition support to now include Linux and Mac (as well as Windows), additional rich text support for free text annotations, HTML2PDF functionality now allows cookie loading straight from memory and many more upgrades.
On the mobile side of this release, you can now add languages with Android Xamarin with just 2 lines of code, autosave flags for automatically saving signed documents and loads of new demos for search, shapes, watermarks and image to PDF conversion to make your developing faster to market.
For our Web PDF library, we’ve added new features for annotations and forms including new classes PDFControl and Widget for controlling types and appearance, extended support for screen annotations and automatic calculations in form fields. Finally, we’ve also added CSV and TXT file format support for form importing and exporting.

ADVANCED TECHNOLOGY

XFA FORMS
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.

RIGHTS MANAGEMENT
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
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.
REDACTION
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.
FOXIT ANDROID PDF SDK
Our Android PDF Reader is built with our PDF SDK for Android and free to download from the Google Play Store.
BENEFITS
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.
GOOGLE PLAY READY
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
Powered by Foxit's Core Technology
SYSTEM REQUIREMENTS
- 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) { return; } try { Bookmark bookmarkRoot = doc.getRootBookmark(); if (bookmarkRoot == null) { return; } Bookmark firstChild = bookmarkRoot.getFirstChild(); modifyOutline(firstChild); if (false == doc.saveAs(outputFilePath, PDFDoc.e_SaveFlagNormal)) { Toast.makeText(mContext, "Save document error!", Toast.LENGTH_LONG).show(); return; } } catch (PDFException e) { Toast.makeText(mContext, "Outline demo run error. " + e.getMessage(), Toast.LENGTH_LONG).show(); return; } finally { Common.releaseDoc(mContext, doc); } Toast.makeText(mContext, Common.runSuccesssInfo + outputFilePath, Toast.LENGTH_LONG).show(); } private void modifyOutline(Bookmark bookmark) { try { if (bookmark.isEmpty()) return; if (index % 2 == 0) { bookmark.setColor(0xFFFF0000); bookmark.setStyle(Bookmark.e_StyleBold); } else { bookmark.setColor(0xFF00FF00); bookmark.setStyle(Bookmark.e_StyleItalic); } bookmark.setTitle("foxitbookmark" + index); index++; //Traverse the brother nodes and modify their appearance and titles. Bookmark nextSibling = bookmark.getNextSibling(); modifyOutline(nextSibling); //Traverse the children nodes and modify their appearance and titles. Bookmark child = bookmark.getFirstChild(); modifyOutline(child); } 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(); return; } 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) { return; } //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()){ bitmap.eraseColor(Color.TRANSPARENT); } else { bitmap.eraseColor(Color.WHITE); } 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(); } progressive.delete(); if (state == Progressive.e_Error) { Toast.makeText(mContext, String.format("Failed to render the page No.%d failed!", index), Toast.LENGTH_LONG).show(); return; } //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(); return; } renderer.delete(); pdfPage.delete(); 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); } } }