linkedin

Topics

⌘K
  1. Home
  2. /
  3. Docs
  4. /
  5. Topics
  6. /
  7. Tickets
  8. /
  9. PDF tickets

PDF tickets

Requires the FooEvents PDF Tickets plugin

The FooEvents PDF Tickets plugin attaches tickets as PDFs to the email that is sent to attendees or ticket purchasers. You can choose to send just the PDF and plan text mail, or you can set FooEvents to attach the PDF to the HTML ticket email.

Sections #

Setting up FooEvents PDF Tickets

  1. Go to FooEventsSettingsPDF Tickets
    • Enable PDF tickets – Adds PDF ticket attachments to ticket emails
    • Enable PDF ticket downloads – Allows purchasers to download a copy of their PDF tickets from the My Account page
    • Attach PDF ticket to HTML ticket email – Attaches the PDF ticket to the HTML ticket email when sent
    • Font – Choose between DejaVu Sans (default) and Firefly Sung which supports Chinese, Japanese and Korean (CJK) characters for PDF tickets
  2. Go to the PDF Ticket settings tab for your event
    • Email text – Set the body text for ticket emails
    • Ticket footer text – Set a message in the footer of the tickets
  3. Go to the Event tab for your event
    • PDF ticket theme – The “Default PDF Single Theme” will display each ticket on its own page with its own event header in the PDF ticket file that is sent to your customer. The “Default PDF Multiple Theme” will display the event header at the top of each page followed by three tickets of the same event in the PDF ticket file that is sent to your customer. There are also other PDF ticket compatible themes available for download on the FooEvents Ticket Themes page
    • If your event is set to email tickets to the purchaser then all tickets from the same event will be contained in one PDF document
    • If your event is set to email tickets to each individual attendee then each ticket will be contained in its own individual PDF document

Modifying FooEvents PDF Ticket Themes

Please familiarize yourself with FooEvent Ticket Themes before proceeding with this section. If you have some basic coding knowledge or work with a developer, the Starter Ticket Theme can be used as a template to design your own tickets from scratch.

It’s important to keep in mind that the way PDF tickets are generated is slightly different to regular HTML and CSS. There are some styles and elements that might work fine when rendering an HTML email or file, but these styles might not be compatible with the library used to generate the PDF files.

Here are some important things to be aware of when creating or modifying PDF Ticket Theme files:

1. You can use either JPG or PNG images. If PNG images with transparency do not render as intended then you will have to enable the extension “imagick” in PHP. If you’re unsure how to do this then your host might be able to assist.
2. Try to avoid using <table> elements but rather use <div> tags.
3. If you want to center images specifically avoid using the CSS declaration “margin: auto” but rather use “text-align: center”
4. Don’t use Google Fonts. The built-in DejaVu font supports a wide range of characters including the Greek, Cyrillic, Hebrew and Arabic alphabets.
5. Try to avoid nesting elements e.g.

<div>
  <div>Some content</div>
<div>

6. Don’t use the CSS declaration “display: block” on images as it might hide the image in some cases.
7. If you don’t want an element to stretch over two pages, add the declaration “page-break-inside: avoid;”
8. If you are nesting elements then apply CSS padding on the inner container and not the outer container.
9. Use paths for images instead of URLs like in regular HTML.
10. Add a closing </body> tag only and not a closing </html> tag for multiple PDF pages
11. Don’t use the CSS “float” property on a tag that is nested inside another floated tag
12. If a customer is buying more than one ticket for the same event then most PDF ticket themes will display the header and event information followed by 3 tickets, per page. If the PDF ticket looks broken then it might be because all this information does not fit on one page. To fix this you can use a log and/or header image that are not as high, remove padding, margins or text or set it so that only 1 or 2 tickets are shown on one page.

Dompdf PHP library

The FooEvents PDF Tickets plugin makes use of the Dompdf PHP library to generate .pdf documents. We will update the Dompdf library in future plugin updates, however, should you wish to change or update the version of the library yourself, here are the steps:

  1. Download the required version of the Dompdf library from https://github.com/dompdf/dompdf
  2. Extract the .zip archive

Copy and paste the extracted directory into the following directory: /fooevents_pdf_tickets/vendors/dompdf/dompdf

Please note, Dompdf does not currently support non-Latin characters.

Send HTML email tickets with PDF attached

You can set FooEvents to either send an HTML ticket email with the PDF ticket attached, or you can send an email with only the PDF ticket attached.

Please follow these steps to send the plain text version with a PDF attached:

  • ​Login to your WordPress Admin Area
  • Go to FooEvents > Settings > PDF Tickets
  • Ensure the setting Attach PDF ticket to HTML ticket email is NOT enabled
  • You can then edit the email text in the PDF Tickets tab of your events settings

FooEvents PDF ticket settings

Changing the PDF Tickets file name

Unfortunately, it is not currently possible to change the PDF file name as it needs to be in a specific format. The letters that you see are a combination of the ticket number and hash code that serves as a security and data validation check. This is a security feature as it makes it harder for automated bots to access the PDF files directly.

Tags , , , , , , , , , , , , ,