marcelhavlik
Member
Hello, I have just updated one site via Joomla update system to Fabrik 3.9 and cannot generate PDF custom detail templates. Previous version worked like a charn, but now in 3.9 it generates completely blank pages (blank PDF output incl. PDF debug) and filename is pdf.pdf instead of custom file name (configured in /components/com_fabrik/views/details/tmpl/postupovylist_PDF/layouts/form/fabrikfabrik-pdf-title.php). Fabrik debug mode also does not generate any information. Switch to integrated template (protostar) and update to latest github version did not resolve the issue - still blank page.
My template is located in folder /components/com_fabrik/views/details/tmpl/name_PDF/default.php
example of my custom template:
My template is located in folder /components/com_fabrik/views/details/tmpl/name_PDF/default.php
example of my custom template:
PHP:
<html>
<head>
<style>
* {
font-family:'dejavu sans'!important;
}
tr.border_bottom td {
border-bottom:1pt solid black;
}
</style>
</head>
<body>
<table class="tg" style="border-image: initial; width: 100%; border: 2px solid #000000; page-break-after: always; border-collapse: collapse;" border="0">
<tbody>
<tr style="border-image: initial; border: 2px solid #000000;"><th style="background-color: #e8e8e8; height: 70px; text-align: center; vertical-align: bottom
" colspan="6"><span style="font-size: 20pt;">FORM NAME<br />{fabrik_vyroba___vyroba_cislo_zakazky}</span></tr>
<tr style="border: 2px solid #000000;">
<td style="background-color: #cccccc; text-align: center;" colspan="6"><strong><span style="font-size: 12pt;"></span></strong></td>
</tr>
<tr>
<td style="background-color: #e8e8e8; text-align: center;" colspan="6"><strong><span style="font-size: 12pt;">LIST OF RECORDS</span></strong></td>
</tr>
<tr style="border-bottom:1px solid black; background-color: #cccccc;">
<td style="text-align: right;" width="5%"><span style="font-size: 12pt;">No.</span></td>
<td style="text-align: left;" width="15%"><span style="font-size: 12pt;">Size</td>
<td style="text-align: right;" width="5%"><span style="font-size: 12pt;">Count</span></td>
<td style="text-align: right;" width="15%"><span style="font-size: 12pt;">Weight</td>
<td style="text-align: right;" width="45%"><span style="font-size: 12pt;">Design</td>
<td style="text-align: left;" width="15%"><span style="font-size: 12pt;">Area</td>
</tr>
<?php
foreach ($this->data['fabrik_vyroba_47_repeat___vyroba_polozky_vypocet_pozice'] as $key => $nazev) { ?>
<tr class="border_bottom">
<td style="text-align: right;"><span style="font-size: 12pt;"><?php echo $this->data['fabrik_vyroba_47_repeat___vyroba_polozky_vypocet_pozice'][$key]?> </span></td>
<td style="text-align: left;"><span style="font-size: 12pt;"> <?php echo $this->data['fabrik_vyroba_47_repeat___vyroba_polozky_vypocet_rost_sirka'][$key] . "x" . $this->data['fabrik_vyroba_47_repeat___vyroba_polozky_vypocet_rost_vyska'][$key]?></span></td>
<td style="text-align: right;"><span style="font-size: 12pt;"><?php echo $this->data['fabrik_vyroba_47_repeat___vyroba_polozky_vypocet_pocet'][$key]?></td>
<td style="text-align: right;"><span style="font-size: 12pt;"><?php echo $this->data['fabrik_vyroba_47_repeat___vyroba_polozky_vypocet_rost_vaha'][$key]?> kg</td>
<td style="text-align: right;"><span style="font-size: 10pt;"><?php echo strstr($this->data['fabrik_vyroba_47_repeat___vyroba_polozky_vypocet_nosnypas'][$key], '(', true) . "; " . $this->data['fabrik_vyroba_47_repeat___vyroba_polozky_vypocet_oko_sirka'][$key] . "x" . $this->data['fabrik_vyroba_47_repeat___vyroba_polozky_vypocet_oko_vyska'][$key] . "; " . strstr($this->data['fabrik_vyroba_47_repeat___vyroba_polozky_vypocet_vyplnovypas'][$key], '(', true) . "; "?>
</span></td>
<td style="text-align: left;"><span style="font-size: 12pt;"> <?php echo $this->data['fabrik_vyroba_47_repeat___vyroba_polozky_vypocet_provedeni'][$key]?></span></td>
</tr>
...