# ab-pdf-extract

> Extract pages from a PDF into canvas elements on the client side

Latest version **1.0.1** (published 2016-12-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install ab-pdf-extract
pnpm add ab-pdf-extract
yarn add ab-pdf-extract
bun add ab-pdf-extract
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2016-12-12 |
| First published | 2016-05-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Antonio Brandao |
| Maintainers | antoniobrandao |
| Keywords | pdf, extract, client, pdfjs |

## Links

- npm: https://www.npmjs.com/package/ab-pdf-extract
- Repository: https://github.com/antoniobrandao/ab-pdf-extract
- Issues: https://github.com/antoniobrandao/ab-pdf-extract/issues
- npm.io page: https://npm.io/package/ab-pdf-extract

## Dependencies (1)

- [pdfjs-dist](https://npm.io/package/pdfjs-dist.md) ^1.5.274

## Alternatives

- [@cantoo/pdf-lib](https://npm.io/package/@cantoo/pdf-lib.md) — 297.9K weekly downloads
- [datatables.net-buttons](https://npm.io/package/datatables.net-buttons.md) — 200.1K weekly downloads
- [@ckeditor/ckeditor5-export-pdf](https://npm.io/package/@ckeditor/ckeditor5-export-pdf.md) — 167.0K weekly downloads
- [scanbot-web-sdk](https://npm.io/package/scanbot-web-sdk.md) — 15.0K weekly downloads
- [@syncfusion/ej2-angular-pdfviewer](https://npm.io/package/@syncfusion/ej2-angular-pdfviewer.md) — 8.8K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2016-12-12
- 1.0.0 — 2016-05-26
- 0.0.5 — 2016-05-26
- 0.0.4 — 2016-05-26
- 0.0.3 — 2016-05-26
- 0.0.2 — 2016-05-26
- 0.0.1 — 2016-05-26

## 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](http://npmjs.org) do:

```bash
$ 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

---
_Source: https://npm.io/package/ab-pdf-extract · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
