1. Fabrik 3.5.2 is now available to download. Read the blog for highlights about this release.

    As always, please back up your site prior to updating and if possible test in a dev environment first.

    Also, our 3.5.1 package file was hacked, the effected dates were 1/15/2017 - 1/17/2017. If during those days you downloaded the 3.5.1 package file from the JED or our site download page, please re-install the package with a fresh copy or upgrade to Fabrik 3.5.2. Github downloads were not effected.

PDF output

Jan 30, 2017
PDF output
  • Docu is work in progress.


    If Fabrik PDF output should be used you must update from (Fabrik) GitHub the get the necessary files including the dompdf library (it's to big to have it in Fabrik core).
    Check Fabrik options "Debugging" tab: Debug PDF has to be NO

    3rd party compatibility(top)

    Plugin System - Flexisystem, core functions: make sure "Redirect pdf format" is set to NO.


    PDF options can be set in list and form settings ("Layout" section)
    The PDF icon has also global options in Fabrik "Options".

    PDF templates(top)

    The standard templates can be used, but is recommended to create custom PDF templates.
    To create a custom template, copy the templates folder and rename it. Template locations are as follows:
    • Joomla 3+: Form: components/com_fabrik/views/form/tmpl/
    • Joomla 3+: Details: components/com_fabrik/views/details/tmpl/
    • Joomla 3+: List: components/com_fabrik/views/list/tmpl/
    • Joomla 2.5+: Form: components/com_fabrik/views/form/tmpl25/
    • Joomla 2.5+: Details: components/com_fabrik/views/details/tmpl25/
    • Joomla 2.5+: List: components/com_fabrik/views/list/tmpl25/
    Dompdf has issues in rendering e.g. float and boxes, in a custom template you can adapt the CSS settings to your needs.
    CSS example details view(top)
    To get labels left you can add or modify your custom CSS File.
    Code (Text):
    #{$form} .fabrikElementContainer.span12 {position:relative;margin-bottom:10px}
    #{$form} .fabrikElementContainer .span4 {display:inline-block;width:30%}
    #{$form} .fabrikElementContainer .span8 {display:inline-block;left:31%;width:68%}
    To display yes/no (domPDF standard fonts don't support the IcoMoon icons)
    Code (Text):
    #{$form} .icon-checkmark:before {content:'yes'}
    #{$form} .icon-remove:before {content:'no'}
    CSS example list div template(top)
    Code (Text):
    #listform_$c .fabrikList .row-fluid .span4 {display:inline-block;width:26%;float:none;}
     #listform_$c .fabrikList .row-fluid {page-break-inside:avoid;}

    PDF template with page header, footer and pagenumber(top)

    Create a custom template.
    Edit default.php (this example is referring to a copy of fabrik list bootstrap template):
    Below line "defined('_JEXEC') or die('Restricted access');" add
    Code (Text):
    <div id="footdompdf">
        <span class="footleft"><?php echo $this->table->label;?></span>
        <span class="pagenum">Page </span>
    <div id="headerdompdf">
        <span class="headleft"><?php echo $this->table->label;?></span>
        <span class="pdfdate">19-11-2013</span>
    Create/edit custom_css.php
    Add CSS
    Code (Text):
    body {margin-top:1.5em;margin-bottom:1.5em}
    #headerdompdf {
        position: fixed;
        top: 0px;
        border-bottom: 1px solid red;
    #footdompdf {
        position: fixed;
        bottom: 0px;
        height: 1.1em;
        border-top: 1px solid red;
    #footdompdf .pagenum { position:absolute;
        right: 20px;}
    #footdompdf .pagenum:after {
      content: counter(page) ; //This is including the page number at bottom right
    #footdompdf .footleft {

    PDF fonts, UTF-8 characters(top)

    Dompdf is using it's own fonts included in dompdf\lib\fonts, the dejavu fonts are supporting UTF-8 characters.
    Additionally ARIAL UTF-8 fonts are included in the Fabrik dompdf lib and in ...libraries\dompdf\lib\fonts\dompdf_font_family_cache.dist.php
    To force the PDF output to use these UTF-8 fonts include e.g.
    Code (Text):
    * {font-family:arial!important}
    * {font-family:'dejavu sans'!important}
    in your custom_css.php
  • Loading...