Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Pdf Optimizer Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Timeout

Customize the timeout setting to exert control over the duration of the optimization process, allowing you to fine-tune the time allocated for the operation based on the specific requirements of your application or environment.

{% tabs %} {% tab title="Standalone PHP" %} By default processes have a timeout of 300 seconds, however you can change it passing a different timeout (in seconds) to the setTimeout method:

use Mostafaznv\PdfOptimizer\PdfOptimizer;

PdfOptimizer::init()->setTimeout(500)->optimize('input.pdf, 'output.pdf');

{% endtab %}

{% tab title="Laravel" %} By default, processes have a timeout of 300 seconds, which is set by config('pdf-optimizer.timeout'). However, you can modify this timeout by passing a different duration (in seconds) to the setTimeout method:

use Mostafaznv\PdfOptimizer\Laravel\Facade\PdfOptimizer;

PdfOptimizer::open('input-1.pdf')
    ->setTimeout(500)
    ->optimize('output-1.pdf');

{% endtab %} {% endtabs %}

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4
php-http/client-implementation
phpcr/phpcr-implementation
cucumber/gherkin-monorepo
haydenpierce/class-finder
psr/simple-cache-implementation