Giter Site home page Giter Site logo

szambran / batch-pdf-image-extractor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vr51/batch-pdf-image-extractor

1.0 1.0 0.0 19 KB

Extract images from PDF documents. Works on multiple and single PDF files

Home Page: https://journalxtra.com/linux/scripts-linux/batch-pdf-image-extractor/

License: GNU General Public License v3.0

Shell 100.00%

batch-pdf-image-extractor's Introduction

Batch-PDF-Image-Extractor

Extract images from PDF documents. Works on multiple and single PDF files. Requires BASH.

Instructions

  • Copy batch-pdf-image-extractor.sh to a directory that contains PDF files
  • Make batch-pdf-image-extractor.sh executable. Either right-click to edit file properties or run chmod +x batch-pdf-image-extractor.sh
  • Run the script with bash batch-pdf-image-extractor.sh or just click the file 'batch-pdf-image-extractor.sh'

What Will Happen

  • The script will look for PDF files in the active directory.
  • The files will then be processed to extract any images.
  • The images will be extracted
  • Extracted images will be converted to PNG format
  • Images will be moved into an 'images' directory
  • PDF files will be moved into a 'pdf' directory

Configs

Three optional configuration variables exist. These control image conversion and whether processed files are moved or copied. The default settings suit most workflows (i.e process PDF(s), convert images to PNG, then move files).

The configs are at the top of the script file:

##
#
# Configs
#
##

extensions=( tiff tif pmb ppm ) # List the output image extensions that should be converted to a different format
format='png' # State the format images with $extensions should be converted to.
organize='move' # 'copy' or 'move' all files into subdirectories organised by extension type. Leave empty for no organization.

## END Configs

Requirements

This script reqires pdfimages to be installed. The script will check for pdfimages and prompt for its installation if not found.

Known Issues

Any issues with pdfimages will also be evident in Batch PDF Image Extractor. Images fail to extract from some PDF files. I don't know why this is. Will look into it when I get time.

Donations

I give a lot to the open source community. All donations are welcome. Please send donations to https://paypal.me/vr51

batch-pdf-image-extractor's People

Stargazers

Sergio Zambrano avatar

Watchers

James Cloos 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.