Skip to content

Commit

Permalink
Merge pull request #5 from yakovmeister/next
Browse files Browse the repository at this point in the history
Next
  • Loading branch information
yakovmeister authored Apr 9, 2018
2 parents 645af80 + b898117 commit 9a2dede
Show file tree
Hide file tree
Showing 8 changed files with 402 additions and 422 deletions.
8 changes: 6 additions & 2 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"presets": ["env"],
"plugins": ["syntax-async-functions", "transform-regenerator"]
"presets": [
"env",
"stage-0",
"stage-1",
"stage-2"
]
}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package-lock.json
node_modules
/test/o
/test/output
2 changes: 1 addition & 1 deletion lib/index.js

Large diffs are not rendered by default.

21 changes: 12 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "pdf2pic",
"version": "1.1.7",
"description": "Node module for converting PDF to image based on pdf2img by Fitra Adity",
"version": "1.2.0",
"description": "A utility for converting pdf to image and base64 format.",
"main": "index.js",
"license": "MIT",
"homepage": "https://github.com/yakovmeister/pdf2image",
Expand All @@ -11,12 +11,12 @@
},
"scripts": {
"clean": "rimraf ./lib && mkdir lib",
"clean:test": "rimraf ./test/o && mkdir test/o",
"clean:test": "rimraf ./test/output && mkdir test/output",
"clean:compile": "rimraf ./lib/compiled",
"compile:babel": "babel-compile -p env src:lib/compiled",
"compile:babel": "babel-compile -p env -p stage-0 -p stage-1 -p stage-2 src:lib/compiled",
"compile:minify": "minify lib/compiled -d lib",
"compile": "npm run clean && npm run compile:babel && npm run compile:minify && npm run clean:compile",
"test": "npm run clean:test && _mocha test"
"test": "npm run clean:test && _mocha test --require babel-polyfill --require babel-register"
},
"keywords": [
"pdf-to-image",
Expand All @@ -34,21 +34,24 @@
],
"author": "Jacob Baring <[email protected]>",
"dependencies": {
"babel-polyfill": "^6.23.0",
"bluebird": "^3.5.1",
"fs-extra": "^4.0.2",
"gm": "^1.23.0",
"gm-base64": "^1.1.1",
"private-props": "^0.1.1"
"gm-base64": "^1.1.1"
},
"devDependencies": {
"babel-cli": "^6.24.0",
"babel-compile": "^2.0.0",
"babel-core": "^6.26.0",
"babel-minify": "^0.2.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.6.1",
"babel-preset-stage-0": "^6.24.1",
"babel-preset-stage-1": "^6.24.1",
"babel-preset-stage-2": "^6.24.1",
"babel-register": "^6.24.0",
"mocha": "^4.0.1",
"chai": "^4.1.2",
"mocha": "^4.1.0",
"rimraf": "^2.6.1"
}
}
11 changes: 4 additions & 7 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# PDF2Pic
[![Build Status](https://travis-ci.org/yakovmeister/pdf2image.svg?branch=1.0)](https://travis-ci.org/yakovmeister/pdf2image)
[![Version](https://img.shields.io/badge/version-1.1.7-blue.svg)](https://github.com/yakovmeister/pdf2image/tree/1.0)
Node module for converting PDF to image based on pdf2img by Fitra Adity
[![Version](https://img.shields.io/badge/version-1.2.0-blue.svg)](https://github.com/yakovmeister/pdf2image/tree/1.0)
A utility for converting pdf to image and base64 format.

## Prerequisite

* node >= 4.1.2
* graphicsmagick

## Features

Expand All @@ -28,7 +29,7 @@ npm install -S pdf2pic
## Usage

```javascript
let PDF2Pic = require('pdf2pic')
let PDF2Pic = require('pdf2pic').PDF2Pic
let converter = new PDF2Pic({
density: 100, // output pixels per inch
savename: "untitled", // output file name
Expand Down Expand Up @@ -73,7 +74,3 @@ converter.convertToBase64("path/to/pdf/sample.pdf")
## Issues

* running convert() after running convertToBase64() doesn't save the file.
* for some reason, test file results are all fucked up
___

This module is based on Fitra Adity's Great work.
Loading

0 comments on commit 9a2dede

Please sign in to comment.