https://github.com/wellwind/images-to-pdf
The simple library to pack images of target folder into one PDF file.
https://github.com/wellwind/images-to-pdf
Last synced: over 1 year ago
JSON representation
The simple library to pack images of target folder into one PDF file.
- Host: GitHub
- URL: https://github.com/wellwind/images-to-pdf
- Owner: wellwind
- Created: 2019-02-10T11:22:36.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-10T12:09:59.000Z (over 7 years ago)
- Last Synced: 2024-10-12T10:16:54.326Z (over 1 year ago)
- Language: TypeScript
- Size: 17.6 KB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Images to PDF
Convert images in folder to one PDF file.
# Install
```shell
npm i images-pdf
```
or install to global
```shel
npm i g images-pdf
```
# Usage
## CLI
```
Usage: images-pdf [options]
Options:
-V, --version output the version number
-f, --folder the folder that contains the images.
-o, --output the PDF file to generate.
-h, --help output usage information
```
ex: `images-pdf -f ./image/folder -o ./output/file.pdf`
## RequireJS
```javascript
const ImagesToPDF = require('images-pdf');
new ImagesToPDF.ImagesToPDF().convertFolderToPDF('image/folder', 'output/file.pdf');
```
## TypeScript
There are inbuilt type definition file. So you don't have to install any other package.
```typescript
import { ImagesToPDF } from 'images-pdf';
new ImagesToPDF().convertFolderToPDF('image/folder', 'output/file.pdf');
```