image2pdf

v0.0.3
Very simple cli tool to convert multiple images to a pdf
pdf images convert

image2pdf

Helps make the generation of a PDF of multiple images easier

Installation

$ npm install [-g] image2pdf

Usage

If installed locally:

var imager = require('image2pdf')

If installed globally:

Options:

    -h, --help               output usage information
    -V, --version            output the version number
    -v, --verbose            Increase verbosity
    -s, --silly              Increase verbosity even more (takes precedence over verbose)
    -d, --dir <dir>          The directory from which to read the images
    -o, --output <file>      The output pdf
    -q, --quiet              Only log errors (takes precendence over silly and verbose)
    -t, --use-title <title>  Specify the document title
    -d, --no-date            Do not print date created (takes precedence over -D, --date)
    -n, --name <name>        Specify created by

Requirements

node.js >= v0.11.3 phantomjs --harmony-generators flag

API

imager.buildTitle(opts:Object)

Builds the title HTML

imager.readfiles(opts:Object, cb:Function)

Reads the given opts.dir

imager.getHead(opts:Object, function(err,:Function)

Generates the HTML head

imager.createHTML(opts:Object, cb:Function)

Generates the actual HTML document

imager.genPDF(input:String, output:String, cb:Function)

Takes the given input and generates a PDF to output

imager.htmlToPDF(html:String, fp:String, cb:Function)

Takes the given html string and writes it as a PDF to fp

npm i image2pdf

Metadata

  • MIT
  • >=0.11.3 <0.12
  • Evan Lucas
  • released 11/9/2013

Downloads

Maintainers