# Customize PDF Ticket

## 1: Customize layout

#### You can customize layout, fields in pdf ticket&#x20;

![](https://4016371164-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M1-bzGggknMKVWOqg5-%2F-MDK5jLP4s4_Edc6wDQM%2F-MDK7c_fnAED0MC0FPGJ%2FScreen%20Shot%202020-07-28%20at%206.15.18%20PM.jpg?alt=media\&token=3dfe3d95-2ebb-401b-a604-d6aae3311cfc)

Copy file\
Plugins/eventlist/templates/pdf/template.php\
to\
Themes/meup-child/eventlist/pdf/template.php

We are using mPDF to make ticket pdf, so you can read here to know about mPDF: [https://mpdf.github.io/](https://mpdf.github.io/)

#### - Display Custom Field Checkout in PDF Ticket

You can add bellow code in template file:

```
<?php 
$data_checkout_field = get_post_meta( $ticket['ticket_id'], OVA_METABOX_EVENT.'data_checkout_field', true ); 

if( $data_checkout_field ){
	
	$data_checkout_field = json_decode( $data_checkout_field );
	foreach ($data_checkout_field as $key => $value) {
		echo '<br/>'.$key.': '.$value.'<br/>';
	}

}

?>
```

#### - Display Phone of customer in pdf ticket:

You can add bellow code in template file

```
$booking_id = get_post_meta( $ticket['ticket_id'], OVA_METABOX_EVENT.'booking_id', true ); 
$phone = get_post_meta( $booking_id, OVA_METABOX_EVENT.'phone', true ); 
echo '<br/>Phone:'.$phone;
```

## 2: Update font

### Change font size

Check language in site. example English, you can add bellow code to function.php in child theme

```
add_filter( 'el_pdf_font_size_en', function(){ return '14'; } );
```

### Change font family

Check language in site. example English, you can add bellow code to function.php in child theme

```
add_filter( 'el_pdf_font_en', function(){ return 'Sun-ExtA'; } );
```

### Use New font&#x20;

You can add your font to themes/meup-child/font/ folder then add bellow code to function.php file in child theme

```
add_filter( 'el_pdf_font_en', function(){ return 'Sun-ExtA'; } );
```

You can find some extra fonts here: [https://github.com/mpdf/mpdf/tree/development/ttfonts](https://github.com/mpdf/mpdf/tree/development/ttfonts)
