GithubHelp home page GithubHelp logo

bfcns / batch_pdf_compressor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sergeiown/batch_pdf_compressor

0.0 0.0 0.0 22.4 MB

This Win64 batch processing script provides an efficient way to compress PDF files using different compression levels and options. It utilizes the Ghostscript utility for performing the compression.

Home Page: https://github.com/sergeiown/batch_PDF_compressor/releases

License: MIT License

Batchfile 100.00%

batch_pdf_compressor's Introduction

This Windows batch processing script provides an efficient way to compress PDF files using different compression levels and options. It utilizes the Ghostscript utility for performing the compression.

image

Requirements

  1. Installed Ghostscript.
  2. Windows operating system.*

image

* - Tested on windows 10 and windows 11 x64 systems. The scripts have not been tested on earlier versions.

Script Functionality

The script offers the following features:

  1. Automatic selection of English, Ukrainian, or Russian according to the system language using universal UTF-8 (support for external message files has been added).
  2. Selection the path to the directory with PDF files to be compressed using the windows.Forms.FolderBrowserDialog. With path validation and allowance for 3 false addresses or bounces.
  3. Selection of compression level: low, medium, high, ultra.
  4. Choose to delete or save original PDF files.
  5. The script processes all PDF files within the specified directory and its subdirectories.
  6. Displays progress of file processing and compression.
  7. Upon completion, provides an overview of script execution, including the number of processed files, sizes before and after compression, and the compression ratio.
  8. Additionally, the script checks the system for the presence of Ghostscript before execution and maintains a detailed log file for each compression operation.

image

Usage

  1. Install Ghostscript if not already installed.
  2. Use an executable file (best practice) or run a script with a double click or via the command line (If you are using a batch script, make sure that the text files with messages are available in the /messages directory and the modules are available in the /modules directory).
  3. The required language will be selected automatically according to the system settings.
  4. Select the directory containing the PDF files you want to compress. The script will "look" at the lower levels and process the PDFs in the subdirectories on its own.
  5. Select the compression level (1-4) corresponding to the provided options.
  6. Choose whether to delete or keep the original PDF files.
  7. After completion you can find the a log file containing information about processed files and compression results at %UserProfile%\Documents with the name batch_PDF_compressor_log.txt.

image

License

This script is distributed under the MIT License. For more details, refer to the LICENSE.md file.


batch_pdf_compressor's People

Contributors

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