Code Monkey home page Code Monkey logo

fpdf2pic's Introduction

fpdf2pic

A command line tool for converting PDF to images.

Build Status license node NPM version Release Date npm download

Prerequisite

Installation

npm i fpdf2pic -g

Usage

# Show help
pdf2pic -h

# Convert a single PDF to the output directory
pdf2pic -i ./test.pdf -o ./tmp/output_dir

# All PDF files to the output directory in the conversion directory
pdf2pic -i ./pdf_file_dir -o ./tmp/output_dir

After installing it, run pdf2pic --help without arguments to see list of options:

fpdf2pic - A command line tool for converting PDF to images.

Usage:
  pdf2pic [options]
  pdf2pic --help
  pdf2pic --version
  pdf2pic -i pdf_path [-o output_path]

Options:
  -h, --help                          Show message.
  -d, --debug                         Show debugging information.
  -v, --version                       Show version.
  -i, --input-path                    To convert the PDF file path, you can be a single file or folder path.
  -o, --output-dir                    the directory to output the images, The default will convert all pages, eg: -o ./pdf_images.
  -P, --page-range                    The page range to convert,  eg: -P 1,3、 -P 1.
  -W, --width                         The max width of the image to be converted, eg: -W 1024.
  -H, --height                        The max height of the image to be converted, eg: -H 768.
  -F, --format                        The format of the image to be converted, eg: -F png.
  -Q, --quality                       The quality of the image to be converted, eg: -Q 80.
  -D, --density                       The density of the image to be converted, eg: -D 300.
  -C, --compression                   The compression method of the image to be converted, eg: -C jpeg.

  By default, fpdf2pic The images will be converted to the folder where the PDF is located when the output path is not specified.

Preview

show help converting

FAQ

install graphicsmagick

See installation.

In Mac OS X, you can simply use Homebrew and do: brew install graphicsmagick

Contribution

If you have any questions or suggestions, please feel free to open an issue or pull request.

License

MIT License © 2022 funnyzak

fpdf2pic's People

Contributors

dependabot[bot] avatar funnyzak avatar renovate[bot] avatar

Stargazers

 avatar  avatar

Watchers

 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.