Closed johnwbaxter closed 1 year ago
You can use this:
{% set pdfOptions = {
date: entry.dateUpdated|date('U'),
} %}
{% header "Content-Type: application/pdf" %}
{{craft.documentHelper.pdf('_pdf/document.twig', 'inline', '../book_example' ~ '.pdf', entry, pdfOptions)}}
Or install Static Files Autoversioning, because it is a function from this plugin. If it is working fine, please let us know. We used the attached code without an external plugin and version
function on the website. This example works now in our test environment.
Hi, when I try this code I get the error:
Unknown "version" function.
https://github.com/cooltronicpl/Craft-document-helpers#securely-displaying-pdf-documents-in-the-browser-without-saving-to-the-web-folder