mostafaznv/pdf-optimizer
Optimize and compress PDFs in PHP or Laravel using Ghostscript. Fluent API with extensive option support, logging, and customization. Works with file paths, UploadedFile, and storage disks, with optional queue support for async optimization.
{% tabs %} {% tab title="Ubuntu" %}
sudo apt update -y
sudo apt-get install ghostscript
{% endtab %}
{% tab title="Alpine" %}
sudo apk add --upgrade ghostscript
{% endtab %}
{% tab title="MacOS" %}
brew install ghostscript
{% endtab %}
{% tab title="Windows" %}
Note: This package has not been tested on Windows machines. While it is designed to work seamlessly on Unix-based systems, users on Windows may experience compatibility issues.
We recommend testing the package in a Windows environment and welcome any feedback or contributions to enhance Windows compatibility. If you encounter issues or have suggestions for improving Windows support, please feel free to open an issue on our GitHub repository. Thank you for your understanding. {% endtab %} {% endtabs %}
composer require mostafaznv/pdf-optimizer
php artisan vendor:publish --provider="Mostafaznv\PdfOptimizer\PdfOptimizerServiceProvider"
{% hint style="info" %} If you're using Laravel, this command publishes the configuration file, allowing you to customize pdf-optimizer settings. {% endhint %}
How can I help you explore Laravel packages today?