diff --git a/README.md b/README.md index 6daed99..e1392dd 100644 --- a/README.md +++ b/README.md @@ -13,30 +13,19 @@ npm install poppler-simple #### Install in Docker: See `Dockerfile.example` for inspiration/information -### Load: -```javascript -var PopplerDocument = require('poppler-simple').PopplerDocument; -``` +### Documentation: +Documentation is available in form of [typescript definitions](lib/poppler.d.ts). -### Open document: -```javascript -var doc = new PopplerDocument('file://' + pathToDocument); -``` +### Example: -### Get a page: ```javascript -var page = doc.getPage(pageNum); -``` +import { PopperDocument } from 'poppler-simple'; -### Render page to a buffer in jpeg format with 75 quality and 120 DPI: -```javascript -var buf = page.renderToBuffer('jpeg', 120, {'quality': 75}); +let doc = new PopplerDocument('file://' + pathToSomeDocument); +let page = doc.getPage(pageNum); +// renders page to a buffer in jpeg format with 75 quality and 120 DPI: +let result = page.renderToBuffer('jpeg', 120, {'quality': 75}); ``` - - -*** -For more info see _test/test.js_ - ## License Licensed under either of diff --git a/package.json b/package.json index 1fc9fb0..ed5f44f 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "keywords": [ "poppler" ], - "version": "0.6.1", + "version": "0.7.0", "repository": { "type": "git", "url": "git://github.com/blackbeam/poppler-simple.git"