Foxit PDF SDK(安卓版)
使用福昕现代的、易于使用的PDF SDK(安卓版),可以轻松在安卓设备中创建、查看和编辑PDF文件。除了福昕强大的核心API之外,我们还提供内置用户界面扩展组件,即使开发团队对PDF知识了解有限,我们也可以帮助您快速开发产品。基于Fx Core™技术,PDF SDK(安卓版)可以为您提供快速、准确的开发体验。
使用PDF SDK(安卓版)开发PDF软件
使用Android Studio开发PDF软件的开发人员可以在Java、Kotlin或C++的开发语言环境中使用我们的PDF SDK(安卓版)。通过JavaScript,您可以通过Cordova或React Native等移动开发框架绑定RDK库来进行更多的原生开发。福昕为安卓开发者提供了开发PDF软件所需的基本要素,让他们可以轻松地使用我们的技术。简单地说,我们的核心API使我们的产品能够被任何水平和经验的开发人员所使用。

功能



查看PDF
我们的核心API针对安卓和其他移动平台进行了优化,可以提供高保真度PDF文档渲染体验。
数字签名
无需打印文件,用户可以在其安卓设备上签署文件,加速业务处理,并给用户带来舒适的体验。
PDF表单
支持使用安卓设备填写数字表单,使之更高效、快捷。



权限管理
PDF SDK(安卓版)可以通过加密/解密服务或集成自定义数字权限管理(DRM)或信息权限管理(IRM)系统生成受保护的PDF文件。福昕的PDF SDK集成了微软权限管理服务(RMS)。PDF注释
PDF SDK(安卓版)提供丰富的注释和标记功能,支持创建、编辑、导入和导出注释等。
全文搜索
采用SQLite数据库,支持对多种语言类型的PDF文档进行全文检索,提供快速、便捷的搜索体验。
FOXIT PDF SDK 7.5简介
Foxit PDF SDK在2020年最后一次发布中添加了许多新功能和改进。其中,桌面端SDK,版式识别的支持扩展到了Linux 版和 Mac版(此前Windows版已支持),自由文本注释支持富文本格式,HTML转PDF功能可直接从内存中加载Cookie,以及其他功能改进。
在移动端,通过Xamarin插件您只需两行代码即可添加多语言支持(Android版),签名功能提供了是否自动保存的选项,并且,我们还新增了用于搜索、形状、水印以及图像转PDF等功能的示例代码,帮助您的应用程序快速上市。
在Web版PDF库中,我们添加了与注释和表单相关的功能(如用于控制类型和外观的PDFControl类和Widget类),并支持对screen类型注释的设置和表单域的自动计算。最后,我们还为表单数据的导入和导出添加了CSV和TXT文件格式的支持。

高级技术
XFA表单
XFA表单是基于XML的表单。能够安全获取、呈现、移动、处理、输出、更新和打印与静态和动态XFA表单相关的信息。使用XFA表单能简化您的数据共享、数据和获取。
权限管理
将应用程序和文件连接到微软的权限管理服务平台,保护PDF文档的安全。Foxit PDF SDK支持集成自定义IRM和DRM解决方案。
密文处理
出于合法或安全的考虑,通过编程实现搜索和审查文档的敏感信息,确保您的客户和员工的信息安全。通过福昕强大的技术加密文档,使得文档符合通用数据保护条例(GDPR)。
Foxit PDF SDK(安卓版)
福昕阅读器(安卓版)是使用PDF SDK(安卓版)开发而成,可以从Google Play商店免费下载。
优点
原生用户界面
PDF SDK(安卓版)专为开发人员构建。我们提供了内置PDF阅读器,使您开发工作量减半,并允许您自定义此阅读器。
适用于Google Play
PDF SDK(安卓版)完全符合谷歌对应用开发者使用第三方组件的政策,这意味着使用福昕PDF SDK(安卓版)开发,您的应用程序将会更快地在Googly Play应用商店上架。
兼容多种设备
无论是智能手表、手机,还是Chromebook,甚至是汽车,Foxit PDF SDK都能像您期望的那样,帮助您实现在应用程序中查看PDF文档。
福昕核心技术支持
Foxit PDF SDK的核心技术已经存在多年,并且受到许多知名公司的信任。福昕强大的引擎使文档在不同平台上都可以快速查看并且保持一致。
系统要求
- Android 4.x或更高版本
- 32/64位ARM(armeabi-v7a/arm64-v8a)或32位 Intel x86 CPU
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); } } }