-
-
November 8, 2022 at 10:29 am #12967JhaleyslockParticipant
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 -
November 8, 2022 at 11:21 am #12979stevlandKeymaster
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.
-
November 8, 2022 at 11:41 am #12988JhaleyslockParticipant
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
-
-
November 8, 2022 at 11:47 am #12994stevlandKeymaster
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.
-
November 23, 2022 at 6:37 am #13634JhaleyslockParticipant
Appreciate the reply and keeping it on your radar as you work on other things.
I did not see those files in the referenced include/staff or include/client folders, but did locate them in the template subdirectory for both folders, so I am presuming that it was just left out on your link when it got typed up?
Regardless, modified the .logo section of both files and increased the logo size, decreased margin around it, but there was no change on the generated PDF, which makes me believe it did not read that file or section of the file. I will tinker around with it some more as time permits. I am looking to make the logo be more of a banner/header scale that would be significantly wider, so maybe there is a different/better way to approach it. Who knows?
Joey
-
You must be logged in to reply to this topic.