福昕开发者中心・专业 PDF 开发套件
福昕 PDF SDK 鸿蒙版 v3.0 全新发布
福昕 PDF SDK 鸿蒙版是面向 HarmonyOS 与 OpenHarmony 生态的专业级 PDF 开发库,单库覆盖双平台,提供文档解析、渲染、编辑、注释、表单、签名、加密等全链路能力。v3.0 新增阅读器界面深度定制、系统深色主题、注释与表单增强、文件对比与 TTS 朗读等能力,API 完全向后兼容,升级无需迁移。
鸿蒙双平台适配
单库覆盖 HarmonyOS 与 OpenHarmony 双平台,一套代码适配双平台,降低多端维护成本。
阅读器界面深度定制
全屏与工具栏显隐控制、自定义长按菜单、工具栏布局与 More 菜单扩展,UI 自由掌控。
视图与显示增强
重排、裁剪、自动翻页、平移与缩放,UI 跟随系统深色主题,阅读体验更舒适。
注释与表单增强
注释多选、密文、回复、动态 XFA、扁平化等能力,审阅与表单效率大幅提升。
文档处理与辅助阅读
文件对比、填写并签名、密码加密与 TTS 朗读,覆盖更多业务与无障碍场景。
福昕 Office SDK:浏览器端嵌入式 Office 文档处理能力全面升级
Office SDK 为开发者提供完整的浏览器端 Office 文档嵌入解决方案,支持在 Web 页面中无缝加载、渲染和编辑 Word、Excel、PowerPoint 文档,完美适配现代 Web 应用的集成需求。
通过简洁的 JavaScript API 快速集成,支持本地文件、Blob、ArrayBuffer、URL 等多种加载方式,适配政企、金融、OA、协同办公等场景。
全格式支持
原生支持 Word (.docx)、Excel (.xls/.xlsx)、PowerPoint (.pptx) 的完整渲染与编辑,无需依赖任何桌面软件或插件。
高性能渲染
采用优化 Web 引擎实现文档解析与渲染,大文档快速加载,复杂表格与幻灯片流畅展示。
灵活集成
简洁 JavaScript API 快速接入,支持本地文件、Blob、ArrayBuffer、URL 等多种加载方式,适配各种 Web 应用架构。
丰富编辑功能
提供文本格式化、段落对齐、表格操作、幻灯片管理等完整编辑能力,满足日常办公文档处理需求。
高级特性
多语言支持、只读模式、自定义 UI 布局,适配国际化产品、文档预览与定制化办公系统。
// 福昕 PDF SDK V11.1 初始化与文档加载示例
String sn = "";
String key = "";
int error_code = Library.initialize(sn, key);
if (error_code != e_ErrSuccess) {
return;
}
// 加载 "Sample.pdf" 文档
PDFDoc doc = new PDFDoc("Sample.pdf");
error_code = doc.load(null);
if (error_code != e_ErrSuccess) {
return;
}
// 获取文档的第一页
PDFPage page = doc.getPage(0);
// 解析页面
page.startParse(e_ParsePageNormal, null, false);
...
// 福昕 PDF SDK V11.1 初始化与文档加载示例
NSString* sn = @" ";
NSString* key = @" ";
// 初始化库
FSErrorCode code = [FSLibrary initialize:sn key:key];
if (code != FSErrSuccess) {
return -1;
}
// 加载一个 PDF 文档,并解析文档的第一页
NSString* pdfpath = [[NSBundle mainBundle] pathForResource:@"Sample" ofType:@"pdf"];
FSPDFDoc* doc = [[FSPDFDoc alloc] initWithPath:pdfpath];
FSErrorCode errorCode = [doc load:nil];
if (errorCode != FSErrSuccess) {
return -1;
}
FSPDFPage* page = [doc getPage:0];
[page startParse:FSPDFPageParsePageNormal pause:nil is_reparse:NO];
...
// 福昕 PDF SDK V11.1 初始化与文档加载示例
string sn = "";
string key = "";
// 初始化SDK
ErrorCode error_code = Library.Initialize(sn, key);
if (error_code != ErrorCode.e_ErrSuccess) {
Console.WriteLine("Library Initialize Error: {0}\n", error_code);
return;
}
// 加载“Sample.pdf”文档
using (PDFDoc doc = new PDFDoc(@"Sample.pdf")) {
error_code = doc.Load(null);
if (error_code != ErrorCode.e_ErrSuccess) {
return;
}
// 获取文档的第一页并解析
using (PDFPage page = new PDFPage(doc.GetPage(0))) {
page.StartParse(0, null, true);
...
}
}
var pdfui = new UIExtension.PDFUI({
viewerOptions: {
libPath: './lib', // web sdk的库路径。
jr: {
licenseSN: licenseSN,
licenseKey: licenseKey
}
},
renderTo: '#pdf-ui' // the div (id="pdf-ui")
});
// 根据需要修改文件路径。
fetch('/docs/FoxitPDFSDKforWeb_DemoGuide.pdf').then(function (response) {
response.arrayBuffer().then(function (buffer) {
pdfui.openPDFByFile(buffer);
})
})
//初始化SDK
NSString *sn = @"";
NSString *key = @"";
FSErrorCode eRet = [FSLibrary initialize:sn key:key];
if (FSErrSuccess != eRet) {
return; }
//以全屏尺寸初始化一个FSPDFViewCtrl对象
FSPDFViewCtrl* pdfViewCtrl;
pdfViewCtrl = [[FSPDFViewCtrl alloc] initWithFrame: [self.view bounds]];
//打开PDF进行显示
NSString* pdfPath = [[NSBundle mainBundle] pathForResource:@"Sample" ofType:@"pdf"];
[pdfViewCtrl openDoc:pdfPath password:nil completion:nil];
[self.view addSubview:pdfViewCtrl];
...
// 初始化库。
int errorCode = Library.initialize(sn, key);
if (errorCode != Constants.e_ErrSuccess)
return;
// 实例化一个 PDFViewCtrl 对象。
pdfViewCtrl = new PDFViewCtrl(this);
// 设置 RMS UI 操作的关联活动。
pdfViewCtrl.setAttachedActivity(this);
uiExtensionsManager = new UIExtensionsManager(this.getApplicationContext(), pdfViewCtrl);
uiExtensionsManager.setAttachedActivity(this);
uiExtensionsManager.onCreate(this, pdfViewCtrl, savedInstanceState);
pdfViewCtrl.setUIExtensionsManager(uiExtensionsManager);
// 打开并渲染 PDF 文档。
String path = Environment.getExternalStorageDirectory().getPath() + "/FoxitSDK/Sample.pdf";
uiExtensionsManager.openDocument(path, null);
...
// 福昕文档转换 SDK 3.1 初始化与 PDF 转 Word 示例
#include "../../../include/conversion/fs_pdf2office.h"
using namespace foxit;
using namespace conversion::pdf2office;
static const char* sn = "***";
static const char* key = "***";
int main(int argc, char* argv[]) {
int err_ret = 0;
ErrorCode error_code = Library::Initialize(sn, key);
if (error_code != foxit::e_ErrSuccess) {
return 1;
}
try {
// Convert PDF file to Word format file.
PDF2OfficeSettingData setting_data;
PDF2Office::StartConvertToWord(L"word.pdf", nullptr, L"pdf2word_result.docx", setting_data, nullptr);
} catch (const Exception& e) {
err_ret = e.GetErrCode();
} catch (...) {
err_ret = 1;
}
Library::Release();
return err_ret;
}
//初始化SDK
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace test
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
axFoxitPDFSDK1.UnLockActiveX("Licence_ID", "Unlock_code"); // The license key
axFoxitPDFSDK1.OpenFile("C:/FoxitBigPreview.pdf", "");
axFoxitPDFSDK1.SetPageRotate(0, 1);
}
}
}
//初始化SDK
import { FoxitRDKNative } from 'foxit_rdk';
const pdfpath: string = "xxx/Sample.pdf";
// 加载PDF文档
const doc: FoxitRDKNative.PDFDoc = new FoxitRDKNative.PDFDoc(pdfpath);
doc.Load();
// 获取PDF文档页面
const pdfPage: FoxitRDKNative.PDFPage = doc.GetPage(1);
// 添加注释
const rect: FoxitRDKNative.RectF = new FoxitRDKNative.RectF(100, 100, 120, 120);
const note: FoxitRDKNative.Note = new FoxitRDKNative.Note(
pdfPage.AddAnnot(FoxitRDKNative.Annot.e_Note, rect)
);
// 设置注释属性
note.SetIconName("Comment");
note.SetBorderColor(0xff0000ff);
// ... 其他操作
福昕为开发者提供覆盖多终端场景的文档处理 SDK:鸿蒙版 PDF SDK v3.0 面向 HarmonyOS 与 OpenHarmony 生态,Office SDK 面向浏览器端 Office 文档嵌入,均提供高性能、高兼容性、高安全性的专业文档能力,助力政企、金融、OA、档案、协同办公等行业快速搭建专业文档应用。