- This topic has 7 replies, 3 voices, and was last updated 4 months, 2 weeks ago by David.
March 22, 2022 at 9:59 pm #2164237Martin
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.
MartinMarch 23, 2022 at 12:15 am #2164317Fernando Customer Support
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/
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. 🙂March 23, 2022 at 4:16 am #2164505Martin
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.March 23, 2022 at 6:20 am #2164625DavidStaffCustomer SupportMarch 24, 2022 at 4:00 am #2165678Martin
I’ve added a link in the ‘Private information’ field.March 24, 2022 at 5:57 am #2165783DavidStaffCustomer 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 ?March 24, 2022 at 9:35 am #2166209Martin
I’ve given up with it.
There are better alternatives available for generating a PDF from posts.
Thanks for looking into it.
MartinMarch 24, 2022 at 9:51 am #2166238
- You must be logged in to reply to this topic.