#pdf-file #pdf #image #alpha #channel

app image2pdf

A CLI convert multiple images into 1 pdf file

1 unstable release

0.1.0 May 12, 2022

#22 in #pdf-file

MIT license

17KB
347 lines

Image2pdf

Inspired from Img2pdf project.

Features:

  • Support file formats: BMP, PNG, JPG
  • Support color type: L8, La8, Rgb8, Rgba8, Bgr8, Bgra8
  • For image with alpha channel, automatically apply white background

Usage

1. With custom pagesize

$> image2pdf assets/* --output output.pdf --pagesize 150mmx150mm

Output: Pdf file

2. Without pagesize option

$> image2pdf assets/* --output output.pdf

Output: Pdf file

3. With pagesize A4 option

$> image2pdf assets/* --output output.pdf --pagesize A4

Output: Pdf file

4. With pagesize A4 landscape option

$> image2pdf assets/* --output output.pdf --pagesize A4^T

Output: Pdf file

Dependencies

~33–44MB
~327K SLoC