[Resolved] Download PDF e2pdf Shortcode in Hook Element

Home Forums Support [Resolved] Download PDF e2pdf Shortcode in Hook Element

Home Forums Support Download PDF e2pdf Shortcode in Hook Element

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • #2164237

    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:

    $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.


    Customer Support

    Hi Martin.

    It would be best to reach out to the support of this plugin with regards to its functionality and how to make the PDF export button appear.

    A PDF plugin I’ve personally tried is Save as PDF plugin by PDFcrowd: https://wordpress.org/plugins/save-as-pdf-by-pdfcrowd/

    See: https://share.getcloudapp.com/mXuYAykR

    Take note though that we can’t vouch for this plugin though as this is out of our scope.

    Here is the repository of PDF plugins: https://wordpress.org/plugins/search/save+as+pdf/

    Kindly use one that suits you best.

    Hope this clarifies. 🙂


    Thank you for your reply and screenshot.
    I did look at ‘Save as PDF’ as an option that I may go back to.

    Here’s my attempt of a shortcode but it doesn’t work:

    The text appears exactly where it should appear but not the button.

    Customer Support

    Hi there,

    if you can share a link to the page its meant to display on i can take a quick look to see if theres any obvious issues.


    I’ve added a link in the ‘Private information’ field.

    Customer Support

    I was kinda hoping that there would be some markup i could see but theres nothing there.
    I wonder if the shortcode has to be inside the content – what happens if you add it to the post editor ?


    I’ve given up with it.
    There are better alternatives available for generating a PDF from posts.

    Thanks for looking into it.


    Customer Support

    No problems – sometimes best to move on to something new. Hope you have better luck with the next one.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.