In the TCPDF documentation it states that PDF_FONT_SIZE_MAIN controls the default main font size.
Although I tried changing all references to this, it made no difference to the body font size. Can you point me in the right direction (file)?
Change body font size for PDFs
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Change body font size for PDFs
Hi, I think, this is a HTML so you need to set the font size in HTML, see:
administrator\components\com_phocamenu\helpers\phocamenurenderviews.php
and change the style of html tags or classes here:
line cca 863
//PDF
case 2:
e.g.
$tag['group-o'] = '<p style="font-weight:bold;font-size:x-large;">';
to:
$tag['group-o'] = '<p style="font-weight:bold;font-size:xxx-large;">';
or try to set pixels or pts
Jan
administrator\components\com_phocamenu\helpers\phocamenurenderviews.php
and change the style of html tags or classes here:
line cca 863
case 2:
e.g.
$tag['group-o'] = '<p style="font-weight:bold;font-size:x-large;">';
to:
$tag['group-o'] = '<p style="font-weight:bold;font-size:xxx-large;">';
or try to set pixels or pts
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 25
- Joined: 22 Aug 2009, 05:14
Re: Change body font size for PDFs
Thanks Jan
It took a bit of work, but I'm now reasonably happy with the PDF output. I had to use [np] to force page breaks on long menus.
Thanks again for all you help.
This is my code
It took a bit of work, but I'm now reasonably happy with the PDF output. I had to use [np] to force page breaks on long menus.
Thanks again for all you help.
This is my code
Code: Select all
//PDF
case 2:
$tag['header-o'] = '<div style="font-size:11pt;">';
$tag['header-c'] = '</div>';
$tag['date-o'] = '';
$tag['date-c'] = '';
$tag['datesub-o'] = '';
$tag['datesub-c'] = '';
$tag['list-o'] = '';
$tag['list-c'] = '';
$tag['group-o'] = '<div style="font-weight:bold; font-size:14pt; color:#666666;">';
$tag['group-c'] = '</div>';
$tag['item-o'] = '<div>';
$tag['item-c'] = '</div>';
$tag['tableitem-c'] = '</table>';
$tag['message-o'] = '<div style="font-size:11pt;">';
$tag['message-c'] = '</div>';
$tag['image-o'] = '<td width="1pt">';
$tag['image-rs-o'] = '<td width="1pt" ';//Not closed - waiting for rowspan
$tag['image-c'] = '</td>';
if ($suffix == '-bl') {
$tag['tableitem-o'] = '<table border="0" cellpadding="0" cellspacing="0">';
$tag['groupleft-o'] = '<div style="font-weight:bold; font-size:14pt;">';
$tag['groupleft-c'] = '';
$tag['groupright-o'] = '';
$tag['groupright-c'] = '</div>';
$tag['quantity-o'] = '<td width="40pt" style="font-size:11pt;">';
$tag['title-o'] = '<td width="431pt" style="font-weight:bold; font-size:11pt;">';
$tag['priceprefix-o'] = '<td width="5pt" style="text-align:right; font-size:11pt;">';
$tag['price-o'] = '<td width="50pt" style="text-align:right; font-size:11pt;">';
} else if($suffix == '-clm') {
$tag['tableitem-o'] = '<table border="0" cellpadding="0" cellspacing="0">';
$tag['quantity-o'] = '<td width="40pt" style="font-size:11pt;">';
$tag['title-o'] = '<td width="431pt" style="font-weight:bold; font-size:11pt;">';
$tag['priceprefix-o'] = '<td width="5pt" style="text-align:right; font-size:11pt;">';
$tag['price-o'] = '<td width="50pt" style="text-align:right; font-size:11pt;">';
} else {
$tag['tableitem-o'] = '<table border="0" cellpadding="0" cellspacing="0">';
$tag['quantity-o'] = '<td width="40pt" style="font-size:11pt;">';
$tag['title-o'] = '<td width="431pt" style="font-weight:bold; font-size:11pt;">';
$tag['priceprefix-o'] = '<td width="5pt" style="text-align:right; font-size:11pt;">';
$tag['price-o'] = '<td width="50pt" style="text-align:right; font-size:11pt;">';
}
$tag['quantity-c'] = '</td>';
$tag['title-c'] = '</td>';
$tag['priceprefix-c'] = '</td>';
$tag['price-c'] = '</td>';
$tag['desc-o'] = '<td width="431pt" style="font-style:italic; font-size:9pt;">';
$tag['desc-c'] = '</td>';
$tag['footer-o'] = '';
$tag['footer-c'] = '';
$tag['space'] = '';
$tag['spaceimg'] = '';
break;
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Change body font size for PDFs
Ok
If you find Phoca extensions useful, please support the project