gulp-pdf-to-image
v0.1.3
Published
Gulp plugin to split a PDF into separate image files.
Downloads
3
Readme
gulp-pdf-to-image
Install
npm install gulp-pdf-to-image
Usage
const pdfToImage = require('gulp-pdf-to-image');
gulp.task('pdfConvert', function() {
return gulp.src('./*.pdf')
.pipe(pdfToImage({
scale: 2.0,
format: 'jpg',
}))
.pipe(gulp.dest('./'));
});
Options
| Option | Value | Default | Description |
| --- | --- | --- | --- |
| scale
| number
| 1.0
| Scales the page's viewport. |
| format
| 'gif'
|'tiff'
|'jpg'
|'jpeg'
|'png'
| 'png'
| Image output format. |
| filePrefix
| string
| undefined
| Prefix to use for image filenames. Defaults to PDF title. |
| disableFontFace
| boolean
| true
| Set to false
to use system fonts. Set to true
to use embedded fonts. |
Credits
Inspired by Mozilla's PDF.js and its Node examples.