Server InformationosTicket Versionv1.9.14 (8b927a0) —  Up to dateWeb Server SoftwareApache/2.4.18MySQL Version5.5.45PHP Version5.4.45I would like edit what is viewed when my agents click to print the ticket. Where would I find the file to edit how the information is displayed when osticket creates the pdf?

My guess would be: include/class.pdf.php

But I've never tried.

Hmm.. seems when I try to alter any of the code in the file the output is blank when you select the print function

What essentially I'm trying to do is to add a custom footer to the bottom of the print page

blank pages indicate a PHP error.

Then I think I don't know what I'm doing.. perhaps someone here might know how to edit the footer of the print page

What are you trying to add? "custom footer" could mean anything, is it text? Some HTML? An Image? For me to edit the PDF footer, I'd modify the function Ticket2PDF->Footer() found in include/class.pdf.php around line 94, adding text either before or after the existing entries to the footer, either line 104 or 100 etc..To add some "text", try using $this->SetFont('Arial', 'I', 9); // What size & font, must be set before the text.$this->WriteCell(0, 7,"Your text here");  // Actually insert some text into the PDFWhy yours broke:Attempting to print anything there will set an HTTP Header, which causes the download to fail, you can't output (echo/print/printf/etc) anything at all as it will set it's own headers when the file is ready to be sent. To add to the PDF output you need to add to the PDF object using it's methods.More info: http://stackoverflow.com/a/8028987

Thanks Grizly .. I was trying to add an image

Write a Reply...