Giter Club home page Giter Club logo

pdf-compressor's Introduction

PDF Compressor Script

A shell script to automatically compress huge amounts of PDF's on a Linux server. After you added the script in your desired directory, it will loop through all existing direcrories and find all files with a ".pdf extension". The Script will then loop through all of the files and compress them. After the compression was successful, the script will delete the old larger files so your file names won't change. Also every step of the script will be logged in a seperate file in the same directory to give you all the information you need.

Requirements

  1. Functional installation of Ghostscript

Usage

  1. Create a new ".sh" script in the same directory that you would like to be compressed.
  2. Open the file with your desired editor.
  3. Paste the script in the file and set your desired compression mode in the variables section.
    • screen selects low-resolution output similar to the Acrobat Distiller “Screen Optimized”
    • ebook selects medium-resolution output similar to the Acrobat Distiller “eBook” setting.
    • printer selects output similar to the Acrobat Distiller “Print Optimized” setting.
    • prepress selects output similar to Acrobat Distiller “Prepress Optimized” setting.
  4. Make the file executable

sudo chmod +x {filename}.sh

  1. Before you run the script you should backup your files first.
  2. Run the script and

sudo ./{filename}.sh

pdf-compressor's People

Contributors

richard-strittmatter avatar ravage84 avatar

Stargazers

 avatar

Watchers

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