ab-pdf-extract
v1.0.1
Published
Extract pages from a PDF into canvas elements on the client side
Downloads
9
Maintainers
Readme
ab-pdf-extract
Extract pages from a PDF into canvas elements on the client side.
Uses the module 'pdfjs-dist' to extract pages.
Install
With npm do:
$ npm install ab-pdf-extract --save-dev
Usage
var pdf_extract = require('ab-pdf-extract')
var callBack = function(canvases) {
console.log('canvases:');
console.dir(canvases);
}
pdf_extract.extractPDF({
pdfPath : ./somepdf.pdf', // required - path to PDF file
pdfWorkerPath : './pdfjs.worker.js', // optional - path to JS worker file. must be original file from PDFjs
callBack : function(){}, // required - if you want to get the result array containing all the canvas elements
maxWidth : 500, // optional - limit the width of the result canvas elements
maxHeight : 500, // optional - limit the width of the result canvas elements
});
License
MIT