From 4fa5406f27a0155ada155808f2636ba23133b75a Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Wed, 5 Mar 2014 10:53:46 -0600 Subject: [PATCH] pdf: Ensure a paper size is set --- include/class.ticket.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/class.ticket.php b/include/class.ticket.php index 482bafbb7..1f93082e4 100644 --- a/include/class.ticket.php +++ b/include/class.ticket.php @@ -1664,7 +1664,13 @@ class Ticket { //Print ticket... export the ticket thread as PDF. function pdfExport($psize='Letter', $notes=false) { + global $thisstaff; + require_once(INCLUDE_DIR.'class.pdf.php'); + if (!is_string($psize)) + if (!$thisstaff || !($psize = $thisstaff->getDefaultPaperSize())) + $psize = 'Letter'; + $pdf = new Ticket2PDF($this, $psize, $notes); $name='Ticket-'.$this->getExtId().'.pdf'; $pdf->Output($name, 'I'); -- GitLab