- Author: Mark Croxton
This plugin allows you to generate PDFs of your webpages using Pdfcrowd API v2
- Craft 2.x
- A Pdfcrowd account
-
Copy the
pdfcrowd
folder to./craft/plugins/
-
Open your craft/config/general.php file, and add
pdfCrowdApiUser
andpdfCrowdApiKey
to yourenvironmentVariables
array:'environmentVariables' => array( 'pdfCrowdApiUser' => '', 'pdfCrowdApiKey' => '', ),
{# convert the current url #}
{{ craft.pdfcrowd.convert() }}
{# hardcode the url #}
{{ craft.pdfcrowd.convert('https://www.mywebsite.com/my/webpage') }}
{# specify a filename #}
{{ craft.pdfcrowd.convert({
filename : 'my_pdf'
}) }}
{# Specify a URL and filename #}
{{ craft.pdfcrowd.convert({
url : 'https://www.mywebsite.com/my/webpage',
filename : 'my_pdf'
}) }}