Save pictures to PDF
Project description
Save pictures to PDF either from a command line, or in your Python programs.
As a command line tool
Usage:
usage: pictureshow [-h] [-v] [-q] [-m MARGIN] PIC [PIC ...] PDF
positional arguments:
PIC one or more input picture file paths
PDF output PDF file path
optional arguments:
-h, --help show this help message and exit
-v, --version show program's version number and exit
-q, --quiet disable printing to stdout
-m MARGIN, --margin MARGIN
width of empty margin on page; default 72 points (1
inch)
Examples:
$ pictureshow picture.png pic.pdf
Saved 1 picture to '/.../pic.pdf'
$ pictureshow -q *.jpg jpg_pics.pdf
$ pictureshow -m 36 *.png *.jpg *.gif all_pics.pdf
Saved 32 pictures to '/.../all_pics.pdf'
As a Python library
Using the PictureShow class:
from pictureshow import PictureShow
pic_show = PictureShow('pic1.png', 'pic2.jpg', 'pic3.gif')
pic_show.save_pdf('pictures.pdf', margin=36)
Using the pictures_to_pdf shortcut function:
from pictureshow import pictures_to_pdf
pictures_to_pdf('pic1.png', 'pic2.jpg', 'pic3.gif', 'pictures.pdf',
margin=36)
It is however recommended to pass the output file name as a keyword argument:
from pictureshow import pictures_to_pdf
list_of_pictures = ['pic1.png', 'pic2.jpg', 'pic3.gif']
pictures_to_pdf(*list_of_pictures, pdf_file='pictures.pdf', margin=36)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for pictureshow-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d20f90c3375c470bd7a46cef4ae362711e50776e530cd388546f3c0e5b57bec5 |
|
MD5 | a15e8e158e0a2fe6315bcce9560167ef |
|
BLAKE2b-256 | ee0f50fd2f13d62c61a1e1ea04b1d35bff3fa635ec3397fdd384fcc5936c52bd |