https://github.com/terrierscript/pdf-image-pack
pack image to pdf
https://github.com/terrierscript/pdf-image-pack
Last synced: 10 months ago
JSON representation
pack image to pdf
- Host: GitHub
- URL: https://github.com/terrierscript/pdf-image-pack
- Owner: terrierscript
- Created: 2014-04-22T14:49:44.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-05-06T17:13:13.000Z (almost 12 years ago)
- Last Synced: 2025-03-10T16:17:57.162Z (11 months ago)
- Language: JavaScript
- Size: 480 KB
- Stars: 3
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PDF Image Pack
Create conclude some images PDF slide for node.js.
PDF generated by [PDFKit](http://pdfkit.org/)
# Usage
```js
var PDFImagePack = require("pdf-image-pack")
var imgs = [
"./fixture/basic/a.png",
"./fixture/basic/b.png",
]
var output = "./tmp/out.pdf"
var slide = new PDFImagePack()
slide.output(imgs, output, function(err, doc){
console.log("finish output")
})
```
# API
## new PDFImagePack([optoon])
- construction
- options
- option for PDFKit
## PDFImagePack.createDoc(images)
- return pdf slide object with pdfkit
- images
- images path array
## PDFImagePack.output(images, output, callback)
- output pdf slide file
- images {Array}
- images path array
- output {String | Stream}
- output destination.
- if string, use as output path
- callback {Function}