Hello.
I am attempting to add a ‘Download Post as a PDF’ button in a Custom Post Type that uses ACF fields.
All the coding is added to a Hook in Elements.
All PHP works fine up to the point of displaying the E2PDF shortcode so i wonder if anyone can spot what I’ve done wrong here:
<?php
$post_id = get_the_ID();
echo do_shortcode('[e2pdf-download id="1" dataset="'.$post_id.'"]');
?>
[e2pdf-download id="1"]
I’ve created a template in E2PDF settings but the button doesn’t appear.
I’d also be interested in an alternative to E2PDF if anyone know of a better (easier) way of creating a PDF from everything in the main content DIV?
Thanks for reading.
Martin