https://github.com/maemresen/mae-ghostscript
mae-ghostscript is a Docker-based tool for compressing PDF files efficiently using Ghostscript. This containerized solution simplifies the process of PDF compression, providing a consistent environment that works across different platforms. Users can run the container by mounting their local directories and specifying the PDF to compress.
https://github.com/maemresen/mae-ghostscript
bash-scripting containerized-application docker document-processing ghostscript pdf-compression
Last synced: 3 months ago
JSON representation
mae-ghostscript is a Docker-based tool for compressing PDF files efficiently using Ghostscript. This containerized solution simplifies the process of PDF compression, providing a consistent environment that works across different platforms. Users can run the container by mounting their local directories and specifying the PDF to compress.
- Host: GitHub
- URL: https://github.com/maemresen/mae-ghostscript
- Owner: maemresen
- License: mit
- Created: 2024-10-22T07:52:13.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-11-09T19:53:28.000Z (6 months ago)
- Last Synced: 2025-01-11T18:27:48.421Z (4 months ago)
- Topics: bash-scripting, containerized-application, docker, document-processing, ghostscript, pdf-compression
- Language: Shell
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# mae-ghostscript
## Overview
`mae-ghostscript` is a Docker-based tool designed for compressing PDF files using Ghostscript. This repository includes a Docker image that streamlines the PDF compression process in a consistent, containerized environment. For more details, visit the [GitHub repository](https://github.com/maemresen/mae-ghostscript).## Features
- Simple PDF compression using Ghostscript.
- Runs within a Docker container, ensuring a consistent and isolated environment.
- Easy to use with straightforward input commands.## Prerequisites
- [Docker](https://www.docker.com/get-started) installed on your machine.
- Access to the Docker Hub repository [maemresen/mae-ghostscript](https://hub.docker.com/repository/docker/maemresen/mae-ghostscript/general).## Usage
### Running the Docker Container
To compress a PDF file, follow these steps:1. Place your PDF files in a local directory named `pdf-files` (or create one in your current directory).
2. Run the Docker command directly.### Direct Docker Command
Run the container using the following command:```bash
docker run --rm -it --name mae-ghostscript \
-v "$(pwd)/pdf-files:/app/pdf-files" \
-e "INPUT_PDF=your-input-file.pdf" \
maemresen/mae-ghostscript
```### Output File Pattern
The output file will be generated with the pattern `-compressed-.pdf`, where `` is the name of the input file without the `.pdf` extension, and `` is the current date and time. The compressed file will be located in the `pdf-files` directory.**Example:**
- Input file: `example.pdf`
- Output file: `example-compressed-2024_11_09-12_30_45.pdf`## Environment Variables
- `INPUT_PDF`: The name of the input PDF file to be compressed.Ensure that the `INPUT_PDF` file is located in the `pdf-files` directory.
## Building the Docker Image
To build the Docker image locally:```bash
docker build --no-cache -t maemresen/mae-ghostscript .
```## License
This project is licensed under the [MIT License](LICENSE).## Author
Mehmet Arif Emre Sen