Easily implement PDFShift (https://pdfshift.io/) into Craft CMS.
This plugin requires Craft CMS 3.0.0-beta.23 or later.
To install the plugin, follow these instructions (Alternatively, install from the Craft Plugin Store).
-
Open your terminal and go to your Craft project:
cd /path/to/project
-
Then tell Composer to load the plugin:
composer require jacobgraf/pdfshift
-
In the Control Panel, go to Settings → Plugins and click the “Install” button for PDFShift.
-
Go to Settings → Plugins → PDFShift → Settings and enter your PDFShift API Key.
Note: While testing, you can leave the API Key setting blank, which will give you access to free, watermarked conversions, but are rate-limited to two conversions per minute.
Read more here https://docs.pdfshift.io/#rate-limiting
Stop wasting time implementing and maintaining a third-party software/library.
With PDFShift, rely on an up-to-date, high-fidelity conversion API with no maintenance costs.
{{ craft.pdfShift.link({
source: 'https://www.google.com/',
filename: 'google.pdf',
format: 'letter',
sandbox: true
}) }}
{{ craft.pdfShift.download({
source: 'https://www.google.com/',
filename: 'google.pdf',
format: 'letter',
sandbox: true
}) }}
source
is the only required option. Everything else is optional.
filename
is optional and defaults to document.pdf
.
All available options are listed here https://docs.pdfshift.io/#general
Brought to you by Graf Technology, LLC