Giter Site home page Giter Site logo

starkblaze01 / pdf-to-image Goto Github PK

View Code? Open in Web Editor NEW
18.0 3.0 3.0 17.9 MB

Simple Python Command Line tool to convert PDF to Image.

Home Page: https://pypi.org/project/pdftoimg/

License: MIT License

Python 100.00%
pdftoimage poppler pil pdf-converter pip-package pdf image hacktoberfest

pdf-to-image's Introduction

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.

pdf-to-image's People

Contributors

starkblaze01 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.