[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

  • This topic has 7 replies, 3 voices, and was last updated 2 years ago by David.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #2164237
    Martin

    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

    #2164317
    Fernando
    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. 🙂

    #2164505
    Martin

    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:
    https://share.getcloudapp.com/6quZ2rWQ?collection_id=MdfMJ7l

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

    #2164625
    David
    Staff
    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.

    #2165678
    Martin

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

    #2165783
    David
    Staff
    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 ?

    #2166209
    Martin

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

    Thanks for looking into it.

    Martin

    #2166238
    David
    Staff
    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.