Forum

Printed ticket temp...
 
Notifications
Clear all

Printed ticket template modifications

5 Posts
2 Users
0 Reactions
31 Views
Posts: 3
Topic starter
(@haleyslock)
Member
Joined: 4 years ago

Good afternoon all.

I am wondering how to go about adjusting/modifying the template itself that is used when you print off a ticket/generate the PDF?

I have updated the print logo with a new/custom one successfully via the GUI (and it shows the file in the preview as well as the generated PDFs), but there is a large degree of seemingly wasted space around this logo when I print the ticket, in addition to the software auto-resizing the logo that was uploaded to make it fit into this small space. I would like to modify the template that it uses to generate the PDF so that it can allow a larger graphic, with a different aspect ratio (slightly taller, and significantly wider - like a banner photo) , to be shown in the print-logo space.

I have tried turning off the "custom" graphic in OST Awesome, which caused it to revert to the standard OST kangaroo graphic in a similar size. I have tried overwriting the default print-logo.png that is located in the fpdf folder with a new/different one in a different aspect ratio to see what that does, and I have tried modifying the "max-width" and "max-height" fields for the .logo parameter in the ticket-print.tmlp.php file, but nothing seemed to be on the right track for solving this problem. 

Any help you can offer would be greatly appreciated!

Thanks,
Joey


4 Replies
Posts: 1177
Admin
(@stevland)
Member
Joined: 2 months ago

Hi @haleyslock,

It's been a long time since I hacked osTicket's PDF / print template. I would have to retrace my steps.

But a quick Google search turned up this page with potentially useful information:

https://forum.osticket.com/d/90701-pdf-customization/2

If you come up with some worthwhile improvements to how the logo prints feel free to share your insights.

 


Reply
Posts: 3
Topic starter
(@haleyslock)
Member
Joined: 4 years ago

Thanks for the reply @stevland,

I did stumble across that page before posting, which is where I came up with the two files that I did look into/attempt to tweak, but they did not seem to change the image constraints, or at least I could not find the proper section to modify that would have any effect on how it was displayed. The max-height and max-width fields for the .logo section did not seem to change how it was displayed when I tried to double their size (just for a quick/easy test). I presumed that these files would be dynamically loaded whenever printing is called for and that rebooting the system/services would not be required after any modifications. Do you know/would that be correct thinking?

Outside of that, I ran out of ideas and hoped someone else might have some additional insights.

Thanks


Reply
Posts: 1177
Admin
(@stevland)
Member
Joined: 2 months ago

Sorry, I just don't have the time to investigate this. Perhaps I'll look into it at a future date when I am in development mode, but no promises.

In the meantime you would probably get more traction to your question if you asked in the osTicket Forum. The concept is exactly the same, so you probably don't need to mention that you're using osTicket Awesome.


Reply
Posts: 1177
Admin
(@stevland)
Member
Joined: 2 months ago

While preparing the next release I think I may have stumbled on some file(s) that may help you. 

This is just a quick note to say, check

include/client/ticket-print.tmpl

and 

include/staff/ticket-print.tmpl


Reply
Page 1 / 2
Share: