Giter Club home page Giter Club logo

multipage-pdf-to-png's Introduction

Deprecation warning

This repository is outdated. Please use node package /mooz/node-pdf-image as solution. This feature is integrated there.

Even if there are no further plans with this repo, this script is still working and might be a good reference for your project.

PDF to PNG converter

This is a small and simple bash script which convert a single pdf document to a single png file. So whats the secret? This script supports multipage PDF documents and convert them to a single png file.

This script is for you if you have multipage or singlepage pdf documents and need to batch convert them to png. You can run on a full folder with pdf files and convert them all with a single command.

It's written and tested on a mac but should be compatible for linux, too

Requiements

  1. pdfseparate - (brew install poppler will also install pdfseparate)
  2. imagemagick convert - download

Why such requiements?

  • pdfseparate splits the pdf file
  • imagemagick convert it to png combine it back and crop existing whitespace

How to use?

  1. Put that .sh in a folder with some pdf files.
  2. Run chmod +x pdfToSinglePng.sh
  3. Run ./pdfToSinglePng.sh

.png files will be created beside .pdf files with the same filename each pdf page goes vertically upon the other with a spacing between each page. Headers repeating every page.

Demo

no repo without demo: readme_demo.pdf converted to readme_demo.png

if you wanna make a test:
  • check out this repo
  • delete readme_demo.png
  • run script

multipage-pdf-to-png's People

Contributors

roest01 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.