Download the PHP package devraeph/laravel-pdf-protect without Composer
On this page you can find all versions of the php package devraeph/laravel-pdf-protect. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-pdf-protect
Laravel PDF Protect
Simple wrapper package around MPDF's setProtection
method that allows you to set password on PDF files.
Version Compatibilities
Laravel PDF Protect | PHP Version | Laravel 6.* | Laravel 7.* | Laravel 8.* | Laravel 9.* | Laravel 10.* | Laravel 11.* |
---|---|---|---|---|---|---|---|
3.x |
>=8.1 - <= 8.3 |
:x: | :x: | :x: | :x: | :white_check_mark: | :white_check_mark: |
2.x |
>=7.4 - <= 8.2 |
:x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: |
1.1.2 |
>=7.4 - <= 8.1 |
:x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: |
1.0.0 |
>=7.4 - <= 8.0 |
:white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: | :x: |
Installation
You can install the package via composer:
Usage
Version 3.x
In version 3.x the usage supports now multiple Storage support local, s3, ...
OLD Version 2.x
In version 2.x the usage is more common to use and simplified.
You can also add the optional method 'setOwnerPassword':
Alternative new options are: 'setMode' and 'setFormat'.
setFormat is default 'auto' and will now detect the document format. Before v2.x it was set to 'A4'.
Version 1.x
You can also use the old version from v1.x in v2.x, but it is deprecated and will no longer get any updates.
Encrypt method in detail
- $inputFile and $outputFile has to be a path like
storage_path("pdf/document.pdf")
The final file will be located in storage/pdf
as encrypted-document.pdf
Testing
Credits
- Owen Jubilant (creator of the original package) - PDF Password Protect
- DevRaeph (refactored classes to comply with PSR-4)
Sponsor
License
The MIT License (MIT).
All versions of laravel-pdf-protect with dependencies
spatie/laravel-package-tools Version ^1.15.0
illuminate/support Version ^10.0|^11.0
illuminate/contracts Version ^10.0|^11.0
mpdf/mpdf Version ^8.1.3