Skip to content

This is a bash script which convert a multipage(!) pdf document to a single png file. Use it for batch progressing and progress a full folder of pdf files!

License

Notifications You must be signed in to change notification settings

roest01/multipage-pdf-to-png

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

This is a bash script which convert a multipage(!) pdf document to a single png file. Use it for batch progressing and progress a full folder of pdf files!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages