@foxitsoftware/foxit-pdf-sdk-for-web-library-full
TypeScript icon, indicating that this package has built-in type declarations

9.2.2 • Public • Published

Foxit PDF SDK for web

Install

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

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-full');
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-full/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

Readme

Keywords

none

Package Sidebar

Install

npm i @foxitsoftware/foxit-pdf-sdk-for-web-library-full

Weekly Downloads

299

Version

9.2.2

License

Commercial

Unpacked Size

131 MB

Total Files

1143

Last publish

Collaborators

  • cheng_lin
  • jianxin_yang
  • xuexing-he
  • tianwei_wu_foxit
  • hong_lin
  • albanomoura
  • rowanhanna
  • xinqiang_song
  • lzw4x
  • yongliang_huang
  • jim2018
  • foxitsdk
  • foxitniu
  • cancerq
  • linc0803
  • web-sdk-ci
  • webviewer
  • warerwang
  • zhiquan_ye
  • y1j2x34