Skip to content

Generic build of Mainegreen's Forms Fork of Mozilla's PDF.js library.

License

Notifications You must be signed in to change notification settings

mainegreen/pdfjs-forms-dist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PDF.js npm

PDF.js is a Portable Document Format (PDF) library that is built with HTML5. Our goal is to create a general-purpose, web standards-based platform for parsing and rendering PDFs.

This is a pre-built version of the PDF.js Forms source code.

To use in webpack first install:

npm install pdfjs-forms-dist

Then include in your files:

import pdfjsLib from 'pdfjs-forms-dist';
import * as pdfjsViewer from 'pdfjs-forms-dist/web/pdf_viewer';
import 'pdfjs-forms-dist/web/pdf_forms.css';

You may need to set your pdf worker bundle in your code depending on how you configure your webpack:

output: {
    filename: '[name].bundle.js',
    path: path.resolve(__dirname, 'dist')
},

to

pdfjsLib.GlobalWorkerOptions.workerSrc = '../../build/webpack/pdf.worker.bundle.js';

You may need to add to your webpack config:

entry: {
    'pdf.worker': 'pdfjs-forms-dist/build/pdf.worker.entry'
}    

See https://github.com/mozilla/pdf.js or https://github.com/mainegreen/pdf.js for learning and contributing.

About

Generic build of Mainegreen's Forms Fork of Mozilla's PDF.js library.

Resources

License

Stars

Watchers

Forks

Packages

No packages published