Hi thereHas someone modded or can someone assist me in modding the custom data font size on ticket print?Check my attached picture, underneath "Jobcard details", i would like to make that font/table smaller Essentially i would like to make the items on the below code appear smaller:<!-- Custom Data --><?phpforeach (DynamicFormEntry:($ticket->getId()) as $form) {    // Skip core fields shown earlier in the ticket view    $answers = $form->getAnswers()->exclude(Q:(array(        'field__flags__hasbit' => DynamicFormField:,        'field__name__in' => array('subject', 'priority')    )));    if (count($answers) == 0)        continue;    ?>       <table class="custom-data" cellspacing="0" cellpadding="4" width="100%" border="0">        <tr><td colspan="2" class="headline flush-left"><?php echo  $form->getTitle(); ?></th></tr>        <?php foreach($answers as $a) {            if (!($v = $a->display())) continue; ?>            <tr>                <th><?php    echo $a->getField()->get('label');                ?>:</th>                <td><?php    echo $v;                ?></td>            </tr>            <?php } ?>        </table>    <?php    $idx++;} ?>Kind RegardsNoobie

screenshot.jpg

No attached picture.Are you really running a RC (release candidate)?  You should really upgrade to the stable.I would think that you would need to alter /include/class.pdf.php 

Hi i have now attached the image. and sorry i am running the stable version.... not the RC

screenshot.jpg

Ah okay.  I think that the font size may be in /include/mpdf/config.phpI think that the fonts avail are in /include/mpdf/config_fonts.php

Hi found the proper place to change itits actually in ticket-print.tmpl around line 51 you just have to add a "font-size: ##px" line there and it changes the whole custom data table size... now to figure out how to split the table into two

Hopefully you are documenting where you are making your changes.Is your question answered here?

@[deleted] i am  making backups of all the files i edit and keeping notes of where i make my changesthanx

14 days later

Hi! I'm trying to modify the size of the fonts inside the PDF, using "ticket-print.tmpl" file.But, I can see changes only in the "Ticket Detail" field.How can I reduce the font of the content and notes?Thanks.

@[deleted] please open your own thread as your solution may be different from LeratoSelepe. Prior to opening your thread;Please help us to help you by reading and following the posting guidelines located in this thread: Please read before requesting assistance. The more information you give us the better we will be able to assist you. Thank you.

3 months later

Hi all,

Anyone know how to add custom variable that created in User Information in PDF file? I want to change "Source" by my custom field in pdf file.

blank

You cannot change the source of the ticket... its where the ticket was generated from.

@[deleted] to clarify, are you saying when you print a ticket to PDF you want additional information to appear, or you want the additional information to appear in the ticket view?

@[deleted] yes, when I print a ticket to PDF, I want additional information appear, such as information field in User Information form

@[deleted]: I mean change Source by other information or add more information that I mention above.

@[deleted] go to include\staff\templates\ticket-print.tmpl.php line 128This is the ticket metadata, you can then edit what information appears in the top portion of the printout.

Yes, you would have to edit the core source files (specifically the file mentioned above by @[deleted])

@[deleted] & @[deleted]:

I've already edited ticket-print.tmpl.php but I don't know the variable of the field that I created in Contact Information form, pls check the image for detail.

Thank you.

blank

You would need to look in your database tables to find where these variables are stored and what name would pull them out.

In a normal message you would use %{ticket.VARIABLE}I have no idea if this works in anyplace other then in message templates though, as I have never tried it.

Write a Reply...