Skip to content

nishidayuya/img_to_pdf

Repository files navigation

img_to_pdf

A tool to create PDF from raster image.

License X11 Gem Version ubuntu Maintainability Test Coverage

Requirements

  • Ruby
  • ImageMagick

Installation

$ gem install img_to_pdf

Usage

Create PDF from PNG:

$ img_to_pdf input.png output.pdf

Same as:

$ img_to_pdf \
    --paper-size=a4-landscape \
    --horizontal-pages=1 \
    --vertical-pages=1 \
    input.png output.pdf

Create 3x4 pages B5 portrait PDF from JPG:

$ img_to_pdf \
    --paper-size=b5-portrait \
    --horizontal-pages=3 \
    --vertical-pages=4 \
    input.jpg output.pdf

Show help message:

$ img_to_pdf --help

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/nishidayuya/img_to_pdf .