Support » Plugin: Events Manager » generate pdf with ticket

  • Resolved the0and1


    Is it possible to generate a pdf with the details of the event when a user signs up for an event?

    I know how to generate a pdf with php, but I can’t seem to figure out how and where to hook this into the events manager plugin.

    Basically I want to generate a pdf with the eventdetails and the details of the person that has signed up for an event. I want to have a link to this pdf when the message of book approved is shown.

    Can I do this via a template or do I have to fix this in another way?
    (I think the best way to accomplish this is generating this file whilst submitting the form, and use the submitted values in the pdf. But I’m a bit new to wordpress development, so correct me if I’m wrong)

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Support caimin_nwl


    You might want to take a look at this file:


    That’s an easy to read way of seeing how to get the data you’d need to populate your PDF.

    Depending on how you want the user flow to work, you could link to your own version of this from the main booking confirmation page.

    Thanks, I’ll have a look at that. I’ve found the file, but hadn’t thought of that.

    Plugin Support angelo_nwl


    this is not possible out of the box but you can try @caimin suggestion.

    Sorry for my late response, I had some other issues regarding another project I had to work out first.

    Can you explain to me how to create a link to this file when someone subscribed to the event? I can make a link in the succesfull booking text to a file, but I’m not completely sure where to link to. You don’t have to be a site user to register for the event btw.

    Plugin Support caimin_nwl


    A good way to do this might be to copy the file before modifying as described here:

    Using Template Files

    That will keep your file safe during upgrades. You can then modify it as needed.

    Another alternative would be to use that file as the basis of a normal template file within your theme.

    I was already using the template file, what I meant was I’ve created a link in the bookingsform success message:
    <a href="[URL OF MY SITE]/?post_type=event&page=events-manager-bookings&action=bookings_report&event_id=#_EVENTID"> Print your invitation</a>

    But the #_EVENTID isn’t replaced with the actual event id, so it just redirects to a page where it only shows a past event. not the one I want to show the reservation for.

    Another problem is when I input the eventid manually (for testing purposes) it also redirects to the page with past events.

    Plugin Support caimin_nwl


    If you’re trying to link to a page that’s generated by WP admin (it looks like you are), then I think the structure you need is this:


    Is this code in a template? If it is, you need to do something like this to get the placeholder to work:

    global $post;
    $EM_Event = em_get_event($post->ID, 'post_id');
    echo $EM_Event->output('#_EVENTID');

    Yes the page is located in the admin section, but I want this page to be available to every site visitor, now when a visitor is not logged in (like all people signing up for the event), they are asked to login.

    Is there a way to make this happen without the user having to login?

    I finally figured out where the form notices where placed in the bookingform (edited this in a templatefile of events-manager), and I just want to generate a pdf via tcpdf with the info of the event and their name in it. But I’m no coder myself, I understand it, but can’t completely write it (well by trial and error I come pretty far).

    Thanks for all the help so far!

    Plugin Support angelo_nwl


    you might need some help from a developer to do this since you are not a coder –

    Hmm I think I figured out a way to do this. I created a seperate php page which calls the wpdb for the bookings, and takes the latest added booking with a certain event_id. Since I don’t know how to get the booking id returned from the form this is the closest I got.

    If someone has a better way (for example making the bookingsform return the booking_id so I can pass it as a var to this page) please let me know!

    Is it possible to make the bookingform return the bookingid? If yes, how can I do this?


    The booking form can’t return the ID of the booking form, since the booking form is displayed before the booking is created.

    Instead you’ll need to retrieve the booking ID through the current user.

    As Angelo stated, you’re probably going to need a professional WP developer to help you with this.


Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘generate pdf with ticket’ is closed to new replies.