Closed clonemeagain closed 6 years ago
Hmm, this is actually https://github.com/osTicket/osTicket/issues/3770 not me.. phew! Also: https://github.com/osTicket/osTicket/issues/3699
Irritating. I'm working on it.
Open /include/mpdf/mpdf.php, find line 9942, change
$data = $this->$v[1];
into
$data = $this->{$v[1]};
Then it works.
Seems to be different in the later versions of MPDF.. will be fun when osTicket joins the composer world. :-)
Added the following to my /include/staff/templates/ticket-print.tmpl.php
To fix the alignment while using my custom logo: line 129 changed to:
<h1 class="flush-right">Ticket #<?php echo $ticket->getNumber(); ?></h1>
To add attached images into the PDF:
Added after line 240 foreach ($files as $A){
if(in_array(strtolower ( pathinfo ( $A->file->name, PATHINFO_EXTENSION ) ), array('png','jpg','svg'))){
echo "<div><img src=\"cid:" . $A->file->key . '" /></div>';
}
?>
Can't see the top-left logo, likely another cron related global missing..