Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
blackbeam committed Dec 21, 2018
1 parent 1db1a9f commit cb79d7a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 20 deletions.
27 changes: 8 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit cb79d7a

Please sign in to comment.