Skip to content

orca-services/pdf-compressor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages