{"id":1960968,"date":"2024-07-11T02:22:10","date_gmt":"2024-07-11T06:22:10","guid":{"rendered":"https:\/\/theeventscalendar.com\/knowledgebase\/?p=1960968"},"modified":"2026-04-23T18:56:54","modified_gmt":"2026-04-23T22:56:54","slug":"customize-pdf-tickets","status":"publish","type":"post","link":"https:\/\/theeventscalendar.com\/knowledgebase\/customize-pdf-tickets\/","title":{"rendered":"Customizing PDF Ticket Content &amp; Styles"},"content":{"rendered":"\n<p>Customizing event ticket PDFs to provide additional information often involves modifying files located in the <code>event-tickets-plus\\src\\views\\tickets-wallet-plus\\pdf\\<\/code> directory. One common customization is adding a custom note below the event details. For example, if one needs to include special instructions, messages, or personalized greetings on the ticket, they would typically modify the <code>body.php<\/code> file.<\/p>\n\n\n\n<p>Following these steps enables you to quickly include personalized touches into your event ticketing PDF styling, providing attendees with a more informative and engaging experience. This customization enhances the practical information provided and aligns the ticketing process with the unique branding and communication needs of their event.<\/p>\n\n\n\n<p><strong>See also: <\/strong><a href=\"https:\/\/theeventscalendar.com\/knowledgebase\/customize-ticket-file\/\">Customizing the PDF Ticket File Name<\/a><\/p>\n\n\n\n<p>Customizations for The Events Calendar are usually implemented via code snippets or template overrides. Add snippets to your child theme&#8217;s <code>functions.php<\/code> file or use the Code Snippets plugin. Template overrides should go in a child theme. If either approach is new to you, start with <a href=\"https:\/\/theeventscalendar.com\/knowledgebase\/best-practices-for-implementing-custom-code-snippets\/\">Using Code Snippets to Customize The Events Calendar<\/a> and <a href=\"https:\/\/theeventscalendar.com\/knowledgebase\/customizing-template-files\/\">Customizing The Events Calendar Templates<\/a> for a walkthrough of each.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-overview\">Overview<\/h2>\n\n\n\n<p>To start with, let&#8217;s see what files are being loaded when the PDF file is generated. There are four files needed to generate the PDF file, as seen in the template file included in <code>pass.php<\/code> located at <code>event-tickets-plus\\src\\views\\tickets-wallet-plus\\pdf\\pass.php<\/code>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"345\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/07\/Untitled-design-1024x345.png\" alt=\"\" class=\"wp-image-1963703\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/07\/Untitled-design-1024x345.png 1024w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/07\/Untitled-design-300x101.png 300w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/07\/Untitled-design-768x259.png 768w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/07\/Untitled-design-1536x518.png 1536w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/07\/Untitled-design.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<ul class=\"wp-block-list\">\n<li><code>styles.php \u2192 This loads the PDF's style.<\/code><\/li>\n\n\n\n<li><code>header.php<\/code><\/li>\n\n\n\n<li><code>body.php<\/code><\/li>\n\n\n\n<li><code>footer.php<\/code><\/li>\n<\/ul>\n\n\n\n<p>See the image below for how it is structured.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"516\" height=\"690\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/06\/WP-pdf.png\" alt=\"\" class=\"wp-image-1960982\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/06\/WP-pdf.png 516w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/06\/WP-pdf-224x300.png 224w\" sizes=\"auto, (max-width: 516px) 100vw, 516px\" \/><\/figure><\/div>\n\n\n<p>Depending on your layout and customization, you should modify one (or more) file. All the files are located at <code>event-tickets-plus\\src\\views\\tickets-wallet-plus\\pdf<\/code><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-add-a-note\">Add a Note<\/h2>\n\n\n\n<p>Let&#8217;s say that you need to add a note below the event detail, in this case, you should modify <code>body.php<\/code> file. To accomplish this, make a copy of <code>body.php<\/code> and upload it at<code> [your-theme]\/tribe\/tickets-wallet-plus\/pdf\/pass.php<\/code><\/p>\n\n\n\n<p>Open the file in a text editor and add your own custom note, similar to the example below:&nbsp;<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n&lt;?php\n\/**\n * PDF Pass: Body\n *\n * Override this template in your own theme by creating a file at:\n * &#x5B;your-theme]\/tribe\/tickets-wallet-plus\/pdf\/pass\/body.php\n *\n * See more documentation about our views templating system.\n *\n * @link https:\/\/evnt.is\/event-tickets-wallet-plus-tpl Help article for Wallet Plus template files.\n *\n * @since 1.0.0\n *\n * @version 1.0.0\n *\/\n\n?&gt;\n&lt;tr&gt;\n\t&lt;td height=&quot;670&quot;&gt;\n\t\t&lt;table class=&quot;tec-tickets__wallet-plus-pdf-body-table&quot;&gt;\n\t\t\t&lt;tr&gt;\n\t\t\t\t&lt;td&gt;\n\t\t\t\t\t&lt;?php $this-&gt;template( &#039;pass\/body\/post-title&#039; ); ?&gt;\n\t\t\t\t&lt;\/td&gt;\n\t\t\t&lt;\/tr&gt;\n\t\t\t&lt;tr&gt;\n\t\t\t\t&lt;td width=&quot;320&quot;&gt;\n\t\t\t\t\t&lt;table class=&quot;tec-tickets__wallet-plus-pdf-ticket-info-table&quot;&gt;\n\t\t\t\t\t\t&lt;tr&gt;\n\t\t\t\t\t\t\t&lt;td width=&quot;300&quot;&gt;\n\t\t\t\t\t\t\t\t&lt;?php $this-&gt;template( &#039;pass\/body\/ticket-info&#039; ); ?&gt;\n\t\t\t\t\t\t\t\t&lt;p&gt;This is my custom note&lt;\/p&gt;\n\t\t\t\t\t\t\t&lt;\/td&gt;\n\t\t\t\t\t\t&lt;\/tr&gt;\n\t\t\t\t\t&lt;\/table&gt;\n\t\t\t\t&lt;\/td&gt;\n\t\t\t\t&lt;td&gt;\n\t\t\t\t\t&lt;?php $this-&gt;template( &#039;pass\/body\/sidebar&#039; ); ?&gt;\n\t\t\t\t&lt;\/td&gt;\n\t\t\t&lt;\/tr&gt;\n\t\t&lt;\/table&gt;\n\t&lt;\/td&gt;\n&lt;\/tr&gt;\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-add-ticket-description\">Add Ticket Description<\/h2>\n\n\n\n<p>By default, the ticket description only appears on the event page where the ticket is displayed. However, attendees often rely on their PDF Tickets \/ Passes as the main reference for event details. Including the ticket description in the PDF Ticket \/ Pass ensures that important ticket-specific information is always at hand, making the Pass more helpful and reducing the chances of attendees missing key instructions.<\/p>\n\n\n\n<p>Start by making a copy of the following template file: <code>\\wp-content\\plugins\\event-tickets-plus\\src\\views\\tickets-wallet-plus\\pdf\\pass\\body\\ticket-info\\attendee-details\\ticket-title.php<\/code><\/p>\n\n\n\n<p>Place the file in your theme at the following path. If the sub-folders don\u2019t already exist, you\u2019ll need to create them first: <code>\/wp-content\/themes\/[your-theme]\/tribe\/tickets-plus\/tickets-wallet-plus\/pdf\/pass\/body\/ticket-info\/attendee-details\/ticket-title.php<\/code><\/p>\n\n\n\n<p>Add the following lines of code at the very end of the file:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; gutter: false; title: ; notranslate\" title=\"\">\n&lt;?php if ( ! empty( $attendee&#x5B;&#039;product_id&#039;] ) ) : ?&gt;\n    &lt;?php\n    $ticket_excerpt = get_post_field( &#039;post_excerpt&#039;, (int) $attendee&#x5B;&#039;product_id&#039;] );\n\n    if ( ! empty( $ticket_excerpt ) ) :\n        ?&gt;\n        &lt;table class=&quot;tec-tickets__wallet-plus-pdf-attendee-details-ticket-excerpt&quot;&gt;\n            &lt;tr&gt;\n                &lt;td&gt;\n                    &lt;?php echo $ticket_excerpt; ?&gt;\n                &lt;\/td&gt;\n            &lt;\/tr&gt;\n        &lt;\/table&gt;\n    &lt;?php endif; ?&gt;\n&lt;?php endif; ?&gt;\n<\/pre><\/div>\n\n\n<p>PDF Ticket \/ Pass should now display the ticket description:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized has-custom-border\"><img loading=\"lazy\" decoding=\"async\" width=\"1019\" height=\"946\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/09\/GvIBHOff6c.png\" alt=\"Ticket Description in PDF Ticket \/ Pass\" class=\"wp-image-1966997\" style=\"border-width:1px;border-radius:5px;width:500px\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/09\/GvIBHOff6c.png 1019w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/09\/GvIBHOff6c-300x279.png 300w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/09\/GvIBHOff6c-768x713.png 768w\" sizes=\"auto, (max-width: 1019px) 100vw, 1019px\" \/><\/figure><\/div>\n\n\n<p>That\u2019s all it takes! With this customization in place, your attendees will now see the ticket description directly in their PDF tickets and passes. This helps ensure that important details, such as inclusions, instructions, or perks, aren\u2019t missed.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-add-event-description\">Add Event Description<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Locate and copy <code>post-title.php<\/code> template file in the plugin directory:<br><code>\/wp-content\/plugins\/event-tickets-plus\/src\/views\/tickets-wallet-plus\/pdf\/pass\/body\/<\/code><br><\/li>\n\n\n\n<li>In your child theme directory, create the following path and place the copied file:<br><code>[your-child-theme]\/tribe\/tickets-wallet-plus\/pdf\/pass\/body\/<\/code><br><\/li>\n\n\n\n<li>Open the file in a text editor and add the following code just after the <code>&lt;\/tr&gt;<\/code> tag:<\/li>\n<\/ol>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n&lt;tr style=&quot;font-weight:normal;&quot;&gt;\n  &lt;td&gt;\n    &lt;?php echo esc_html( $post-&gt;post_content ); ?&gt;\n  &lt;\/td&gt;\n&lt;\/tr&gt;\n<\/pre><\/div>\n\n\n<p>Save the file and ensure you clear any caching mechanisms in place. The description should now appear in the generated PDF tickets, typically below the event title:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1110\" height=\"788\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/08\/Image-2025-08-19-at-11.11.10-AM.png\" alt=\"\" class=\"wp-image-1966521\" style=\"width:587px;height:auto\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/08\/Image-2025-08-19-at-11.11.10-AM.png 1110w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/08\/Image-2025-08-19-at-11.11.10-AM-300x213.png 300w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/08\/Image-2025-08-19-at-11.11.10-AM-1024x727.png 1024w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/08\/Image-2025-08-19-at-11.11.10-AM-768x545.png 768w\" sizes=\"auto, (max-width: 1110px) 100vw, 1110px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-change-paper-orientation-and-size\">Change Paper Orientation and Size<\/h2>\n\n\n\n<p>By default, Event Tickets Plus generates PDF tickets in Letter size and portrait orientation. If you\u2019d like to customize this behavior, you can use the snippet here and adjust it to meet your needs. The example snippet uses A4 size paper and landscape orientation. You can use any paper format supported by the <a href=\"https:\/\/tcpdf.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">TCPDF library<\/a>, including: A4, A3, A5, Letter, Legal, Tabloid <a href=\"https:\/\/github.com\/tecnickcom\/TCPDF\/blob\/ca5b6de294512145db96bcbc94e61696599c391d\/include\/tcpdf_static.php#L2151\" target=\"_blank\" rel=\"noreferrer noopener\">and more<\/a>. Orientation can be P (portrait\/vertical) or L (landscape\/horizontal).<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nadd_filter( &#039;tec_tickets_wallet_plus_pdf_pass_get_pdf_object&#039;, function( $pdf ) {\n    \/\/ Set paper format and orientation\n    $pdf-&gt;setPageFormat( &#039;A4&#039;, &#039;L&#039; ); \/\/ Change A4 to your preferred format, L for Landscape or P for Portrait\n    return $pdf;\n});\n\n<\/pre><\/div>\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Customizing event ticket PDFs to provide additional information often involves modifying files located in the event-tickets-plus\\src\\views\\tickets-wallet-plus\\pdf\\ directory. One common customization is adding a custom note below the event details. For example, if one needs to include special instructions, messages, or personalized greetings on the ticket, they would typically modify the body.php file. Following these steps&#8230;<\/p>\n","protected":false},"author":27,"featured_media":1955565,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_swpsp_post_exclude":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"ep_exclude_from_search":false,"footnotes":""},"categories":[24,349,59,84],"tags":[],"stellar-product-taxonomy":[155],"class_list":["post-1960968","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-customizing","category-pdf-tickets","category-php","category-templates","stellar-product-taxonomy-event-tickets"],"acf":[],"taxonomy_info":{"category":[{"value":24,"label":"Customizing"},{"value":349,"label":"PDF Tickets"},{"value":59,"label":"PHP"},{"value":84,"label":"Template Overrides"}],"stellar-product-taxonomy":[{"value":155,"label":"Event Tickets"}]},"featured_image_src_large":["https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/02\/social-share-1024x538.png",1024,538,true],"author_info":{"display_name":"Abz","author_link":"https:\/\/theeventscalendar.com\/knowledgebase\/author\/abz\/"},"comment_info":0,"category_info":[{"term_id":24,"name":"Customizing","slug":"customizing","term_group":0,"term_taxonomy_id":24,"taxonomy":"category","description":"","parent":0,"count":67,"filter":"raw","term_order":"0","cat_ID":24,"category_count":67,"category_description":"","cat_name":"Customizing","category_nicename":"customizing","category_parent":0},{"term_id":349,"name":"PDF Tickets","slug":"pdf-tickets","term_group":0,"term_taxonomy_id":349,"taxonomy":"category","description":"","parent":0,"count":4,"filter":"raw","term_order":"0","cat_ID":349,"category_count":4,"category_description":"","cat_name":"PDF Tickets","category_nicename":"pdf-tickets","category_parent":0},{"term_id":59,"name":"PHP","slug":"php","term_group":0,"term_taxonomy_id":59,"taxonomy":"category","description":"","parent":24,"count":52,"filter":"raw","term_order":"0","cat_ID":59,"category_count":52,"category_description":"","cat_name":"PHP","category_nicename":"php","category_parent":24},{"term_id":84,"name":"Template Overrides","slug":"templates","term_group":0,"term_taxonomy_id":84,"taxonomy":"category","description":"","parent":24,"count":27,"filter":"raw","term_order":"0","cat_ID":84,"category_count":27,"category_description":"","cat_name":"Template Overrides","category_nicename":"templates","category_parent":24}],"tag_info":false,"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1960968","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/users\/27"}],"replies":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=1960968"}],"version-history":[{"count":13,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1960968\/revisions"}],"predecessor-version":[{"id":1970174,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1960968\/revisions\/1970174"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media\/1955565"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=1960968"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=1960968"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=1960968"},{"taxonomy":"stellar-product-taxonomy","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/stellar-product-taxonomy?post=1960968"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}