How do I modify an existing FooEvents Ticket Theme or create my own PDF Ticket Theme?

How do I modify an existing FooEvents Ticket Theme or create my own PDF Ticket Theme?

You are here:

This article walks you through the process of creating your own FooEvents Ticket Theme which we recommend you read before continuing:
https://www.fooevents.com/get-creative-with-fooevents-ticket-themes-part-2/

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. For best results use JPG images only. PNG images with transparency might not render as intended.
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
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

By continuing to use this site you agree to the use of cookies. More information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close