@foxitsoftware/foxit-pdf-sdk-for-web-library

中文文档
11.1.1发布于 2026/06/10CommercialTypeScriptCommonJS近 30 天下载 2.5万

Foxit pdf sdk for web.

原始使用文档
文档目录4 节
  1. Install
  2. Integration (Based on webpack & babel)
  3. API Reference
  4. Developer guide

Foxit PDF SDK for web

Install

npm install -S @foxitsoftware/foxit-pdf-sdk-for-web-library

Integration (Based on webpack & babel)

Simplified webpack configuration for copy resources example:

const path = require('path');
const webpack = require('webpack');
const CopyWebpackPlugin = require('copy-webpack-plugin');

const distPath = path.resolve('dist');
const libraryModulePath = path.resolve('node_modules/@foxitsoftware/foxit-pdf-sdk-for-web-library');
const libPath = path.resolve(libraryModulePath, '');

module.exports = {
    mode: 'development',
    plugins: [
        new CopyWebpackPlugin({
            patterns:[{
                from: libPath,
                to: path.resolve(distPath, 'lib'),
                force: true
            }]
        }),
    ]
};

Now you can use it in your code like following:

import * as UIExtension from '@foxitsoftware/foxit-pdf-sdk-for-web-library/lib/UIExtension.full.js';
import '@foxitsoftware/foxit-pdf-sdk-for-web-library/lib/UIExtension.vw.css';

const pdfui = new UIExtension.PDFUI({
    viewerOptions: {
        libPath: '/lib',
        jr: {
            licenseKey: license.licenseKey,
            licenseSN: license.licenseSN,
            enginePath: './jr-engine/gsdk',
            fontPath: 'http://webpdf.foxitsoftware.com/webfonts/'
        }
    },
    renderTo: '#pdf-ui',
    addons: [
        '/lib/uix-addons/path-objects'
    ]
});

pdfui.openPDFByHttpRangeRequest({
    range:{
        url:'/path/to/pdffile.pdf',
    }
},{fileName:'PDF file name.pdf'});

Examples can be edited on CodeSandbox.

API Reference

See API Reference

Developer guide

See Developer guide

版本与发布记录

@foxitsoftware/foxit-pdf-sdk-for-web-library 共发布 40 个版本,首次发布于 2020/12/02;过去 12 个月发布了 3 个版本。

版本发布日期距今
11.1.1latest2026/06/105 个月前
11.1.02026/04/226 个月前
10.0.82026/01/0410 个月前
11.0.52025/11/101 年前
11.0.42025/09/221.1 年前
11.0.32025/07/151.3 年前

关于 @foxitsoftware/foxit-pdf-sdk-for-web-library 的常见问题

@foxitsoftware/foxit-pdf-sdk-for-web-library 是什么?

Foxit pdf sdk for web.

如何安装 @foxitsoftware/foxit-pdf-sdk-for-web-library?

在项目目录运行 npm install @foxitsoftware/foxit-pdf-sdk-for-web-library,或使用 pnpm add / yarn add / bun add。

@foxitsoftware/foxit-pdf-sdk-for-web-library 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@foxitsoftware/foxit-pdf-sdk-for-web-library 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@foxitsoftware/foxit-pdf-sdk-for-web-library 可以商用吗?

@foxitsoftware/foxit-pdf-sdk-for-web-library 使用 Commercial 许可。声明的许可为 Commercial,请阅读许可原文确认使用条件。以上为概括,不构成法律意见,请以许可原文为准。

@foxitsoftware/foxit-pdf-sdk-for-web-library 的下载量有多少?

根据 npm 官方下载统计,@foxitsoftware/foxit-pdf-sdk-for-web-library 在 2026/10/16 – 2026/11/14 这 30 天内被下载 24,836 次,日均约 828 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@foxitsoftware/foxit-pdf-sdk-for-web-library 还在维护吗?

最新版本 11.1.1 发布于 2026/06/10(5 个月前);至今共发布 40 个版本,其中过去 12 个月发布了 3 个;首次发布于 2020/12/02。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。