Come si modifica un tema di biglietto FooEvents esistente o si crea un proprio tema di biglietto PDF o HTML?

Questo articolo vi guida attraverso il processo di creazione del vostro Tema del biglietto FooEvents che si consiglia di leggere prima di continuare:
Diventate creativi con i temi dei biglietti FooEvents - Parte 1
Creatività con i temi dei biglietti FooEvents - Parte 2

È importante tenere presente che il modo in cui vengono generati i biglietti PDF è leggermente diverso dal normale HTML e CSS. Ci sono alcuni stili ed elementi che potrebbero funzionare bene durante il rendering di un'e-mail o di un file HTML, ma questi stili potrebbero non essere compatibili con la libreria utilizzata per generare i file PDF.

Ecco alcune cose importanti da tenere presenti quando si creano o si modificano i file PDF del tema del biglietto:

  1. You can use either JPG o PNG immagini. Se le immagini PNG con trasparenza non vengono visualizzate come previsto, è necessario abilitare l'estensione "imagick" in PHP. Se non si sa come fare, il proprio host potrebbe essere in grado di fornire assistenza.
  2. Try to avoid using <table> ma piuttosto utilizzare <div> tag.
  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 Carattere DejaVu supporta un'ampia gamma di caratteri, tra cui gli alfabeti greco, cirillico, ebraico e arabo.
  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> e non un tag di chiusura </html> per più pagine PDF
  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.

Hai bisogno di supporto?

Non trovi la risposta di cui hai bisogno? Il nostro team è qui per aiutarti, Contattami!