1. Fabrik 3.9 has been released. If you have updated Joomla to 3.9, this is a required update.
    Dismiss Notice

Need custom PDF for list on paper size a4 with pagination.

Discussion in 'Professional Support' started by blue-mouse, Jan 27, 2016.

  1. blue-mouse

    blue-mouse Member

    Level: Community
    Hi,

    I have my own list template:
    /com_fabrik/views/list/tmpl/default-2015-12-14-table-zlicz-pakiety-pdf1
    that i use as:
    - Front-end-template
    and
    -PDF template ( PDF Orientation: Portrait, PDF Paper size: a2)
    ---------------------------------------------------------------------------


    My custom template -PDF template - i can print only when i have:
    PDF Paper size: a2, a1, a0.
    ----------------------------------------------------------------------------

    I need PDF Paper size a4 (PDF orientation: portrait)
    when i try a3, or a4 i get en error:
    Code (Text):
    Fatal error: Maximum execution time of 60 seconds exceeded in /var/www/cc.joomla/libraries/dompdf/include/frame_decorator.cls.php on line 355
    I was testing this problem and see that i can print on a3 when number of lines on list-view is small.
    In that case all printed lines can fit in 1 page sheet.


    When i have on list_view more lines (all my lines are only calculations, i don't have visible records on my custom template for list view) than i have use "a2" that is enought long to fit in all my lines.

    I need have pdf on a4 portrait and fit whole printout on more than 1 page sheet - it can be 2,3,4 sheets for my pdf.

    How to do in my custom-list-template that is also pdf-template: pagination:
    - pagination always when necessary to divide text
    - or pagination beetween my lines on printout in fixed position - for example before line (default.php)
    echo " <div class='podkr1' style='margin-top: -7px; margin-bottom:* {font-family:'dejavu sans'!important} -13px; text-align:right;'> </div><br/>";

    PHP:
    ---------- pagination here ---- how to do? --------

    echo " <div class='podkr1' style='margin-top: -7px; margin-bottom:* {font-family:'dejavu sans'!important} -13px; text-align:right;'>  </div><br/>";
    echo "<div class='tyt1'>Pakiety wej?? dwustanowych IF: - - - - -  Add5</div>";
    if ($order1==0){
    $query = "SELECT  `is_pak_dwus_if`, `konfig_napiecie`, `konfig_wd` FROM  `ccjom_cc_kk_karta_rejestr` WHERE  `rodzaj_karty_np_wzorzec`= '2'  ORDER BY `id`";
    }
    else {
    $query = "SELECT  `is_pak_dwus_if`, `konfig_napiecie`, `konfig_wd` FROM  `ccjom_cc_kk_karta_rejestr` WHERE  `zamow_symbol`=".$order1."  ORDER BY `id`";
    }
     
     

    Attached Files:

    Last edited: Jan 27, 2016
  2. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    We've seen issues with DOMPDF before when a list doesn't fit on one page, and there are some long running threads in the DOMPDF github issue tracker about it.

    The only thing I can suggest you try is to alter your overall DIV structure, so you never have a single div which is longer than a page.

    -- hugh
     
  3. troester

    troester Well-Known Member Staff Member

    Level: Community
    In your other thread you say
    Are you running a recent domPDF library from Fabrik GitHub?
    dejavue should be included (also in the jooma2.5 branch).
    DIVs and HTML tables going over page size may be a problem.
    But in the recent version (recent = about 2 years old) there was a big improvement compared to the older one.
     

Share This Page