1.0.1 • Published 7 years ago

ab-pdf-extract v1.0.1

Weekly downloads
9
License
MIT
Repository
github
Last release
7 years ago

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

1.0.1

7 years ago

1.0.0

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago