Skip to content
Snippets Groups Projects
Commit 4fa5406f authored by Jared Hancock's avatar Jared Hancock
Browse files

pdf: Ensure a paper size is set

parent 3dcc0583
No related branches found
No related tags found
No related merge requests found
......@@ -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');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment