Skip to main content

Easily convert PDF to Image from command line

Project description

Pdf-To-Image

PyPI version Downloads

Simple Command Line tool to convert PDF to Image. It is a wrapper of pdf2image.

How to Install

pip install pdftoimg

You need to install poppler if you don't have already.

  • For Windows you can install it from here.
  • For MacOS you can install it from here.

How to use

  • Open terminal.
  • Run pdftoimg -h for help.

Usage:

  • pdftoimg -i <pdf_path> -o <output_folder_path> -f <format> -d <dpi> -g <True/False>

Example usage:

To convert single PDF to image by specifying absolute path:

  • pdftoimg -i /Users/starkblaze01/Bova/file_name.pdf -o /Users/starkblaze01/output_folder

To convert multiple PDFs in a directory to images in the sample folder:

  • pdftoimg -i /Users/starkblaze01/Bova/input_folder -o /Users/starkblaze01/output_folder
  • Note: Using this will convert all the PDFs present in input_folder directory and its sub-directories.

Definitions:

  • -i for input pdf_file path
  • -o for output_folder path
  • -f for image format(Default: jpeg)
  • -d for dpi(Default: 200)
  • -g for grayscale image(Default: False)

GIF

Click here to see GIF of sample usage.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pdftoimg-0.1.1.tar.gz (2.7 kB view hashes)

Uploaded source

Built Distribution

pdftoimg-0.1.1-py3-none-any.whl (4.0 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page