Skip to main content

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:

$ python -m pictureshow -h
usage: pictureshow [-h] -i PICTURE -o PDF

optional arguments:
  -h, --help            show this help message and exit
  -i PICTURE, --input PICTURE, --picture PICTURE
                        input file path
  -o PDF, --output PDF, --pdf PDF
                        output file path

Example:

$ python -m pictureshow --picture picture.png --pdf output_file.pdf
Saved to file: /.../output_file.pdf
$ python -m pictureshow -i picture.png -o output_file.pdf
Saved to file: /.../output_file.pdf

As a Python library

Using the PictureShow class:

from pictureshow import PictureShow

ps = PictureShow('picture.jpg')
ps.picture_to_pdf('output_file.pdf')

Using the picture_to_pdf shortcut function:

from pictureshow import picture_to_pdf

picture_to_pdf('picture.png', 'output_file.pdf')

Project details


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

pictureshow-0.1.0-py3-none-any.whl (4.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page