sitemill / craft-auto-pdf
Seamlessly create PDF thumbnails using Craft's built in image transformer.
Installs: 19
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:craft-plugin
Requires
- php: ^7.2|^8.0
- ext-imagick: *
- craftcms/cms: ^3.6
This package is auto-updated.
Last update: 2024-04-25 19:41:28 UTC
README
Auto PDF for Craft CMS
Seamlessly create PDF thumbnails using Craft's built in image transformer.
For now this plugin is for internal use at Sitemill, feel free to use if it fits your purpose but no support is guaranteed.
Requirements
This plugin requires Craft CMS 3.6 or later, Imagick, and Ghostscript.
Installation
To install the plugin, follow these instructions.
-
Open your terminal and go to your Craft project:
cd /path/to/project
-
Then tell Composer to load the plugin:
composer require sitemill/craft-auto-pdf
-
In the Control Panel, go to Settings → Plugins and click the “Install” button for Auto PDF.
Auto PDF Overview
Auto PDF will allow you to perform standard Craft transforms on any PDF file, as well as generating PDF thumbnails in the control panel.
Flattening a PDF can be pretty stressful for your server, so to help it out Auto PDF creates and stores a hi-res flattened version of your uploaded PDF and creates subsequent transforms from this.
Configuring Auto PDF
Image Volume
Auto PDF requires you to set up a separate volume to store the hi-res image files. It's recommended that you hide this volume from your users to avoid confusion.
Quality
The compression quality, 'High' is recommended.
Resolution
The resolution in DPI (dots per inch) that the PDF will be opened as, the higher the number the higher the quality before compression.
Converting existing PDFs
Auto PDF converts your PDFs when an asset is saved, therefore you can run ./craft resave/assets
to resave all your assets and generate the flattened counterparts.
Auto PDF Roadmap
Some things to do, and ideas for potential features:
- Delete counterpart on PDF deletion
- Look at pushing conversion to the job queue
Brought to you by Sitemill