postyou / contao-pdf-metadata
Extends the contao file manager to clean up the metadata of PDF files for privacy reasons
Installs: 11
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:contao-bundle
Requires
- php: ^8.0
- contao/core-bundle: ^4.13
- psr/log: >=1.1
- symfony/config: ^5.4 || ^6.0
- symfony/console: ^5.4 || ^6.0
- symfony/dependency-injection: ^5.4 || ^6.0
- symfony/filesystem: ^5.4 || ^6.0
- symfony/http-kernel: ^5.4 || ^6.0
- symfony/process: ^5.4 || ^6.0
Requires (Dev)
- contao/manager-plugin: ^2.0
- friendsofphp/php-cs-fixer: ^3.12
Conflicts
- contao/manager-plugin: <2.0 || >=3.0
README
Extends the contao file manager to clean up the metadata of PDF files for privacy reasons.
The following two commands are executed in the prozess:
$ exiftool -all= -Author='' -tagsfromfile @ -title -keywords -subject -description file.pdf -o intermediate.pdf $ qpdf --linearize intermediate.pdf file.pdf
Requirements
Configuration
# config/config.yaml contao_pdf_metadata: exiftool: # Path to the exiftool binary. path: /usr/bin/exiftool # Environment variables when running exiftool. env: # Prototype name: ~ qpdf: # Path to the qpdf binary. path: /usr/bin/qpdf # Environment variables when running qpdf. env: # Prototype name: ~ # Clean up the metadata of PDF files immediately after uploading. cleanup_on_upload: false # Overwrites metadata fields in the cleaned PDF file. metadata: author: ''
Console Command
To clean up the metadata of PDF files in the files/
directory, you can use the following command:
$ vendor/bin/contao-console pdf-metadata:clean [<path>]