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

Bootstrap tmpl for List different than PDF

Discussion in 'Community' started by Nagtegaal, Oct 4, 2019.

  1. Nagtegaal

    Nagtegaal New Member

    Level: Community
    It seems that I have less influence on a PDF output than on a List. For the attached example I use the same bootstrap template as for the list. In the custom CSS I put the following code:

    #listform_$c .kan_vw_tikkie___BTW {

    max-width: 2mm;
    overflow: hidden;
    background:green
    }

    'Green' although not subtle is working on both but the 'max-width' of 2mm for the column only for the list (on my screen). column_width.PNG I used thi wiki page as my guide.

    Anyone any idea how the max-width would also work in the PDF?
     
  2. lousyfool

    lousyfool Active Member

    Level: Community
    Hi,
    What are you using, domPDF or mPDF?
    Does it work with "!important"?
    Does it work with "width" only? Not sure which versions Fabrik is using, but certain (older) ones seem to have trouble with min- and max- properties.
     
    Nagtegaal likes this.
  3. Nagtegaal

    Nagtegaal New Member

    Level: Community
    Thanks lousyfool, but no succes I tried:

    column-width: 2mm;
    max-width!important: 2mm;
    width: 2mm;

    From the wiki docs I understood it is domPDF
     
  4. troester

    troester Well-Known Member Staff Member

    Level: Community
    domPDF or mPDF depends on your selection in Fabrik options.

    Syntax would be
    max-width: 2mm!important;

    But after a bit Google and some testing I think it's a domPDF issue.
     
    Nagtegaal likes this.
  5. Nagtegaal

    Nagtegaal New Member

    Level: Community
    Thanks Troester, Guess I have to live for it for now. I changed to mPDF (thanks for pointing me out), but see other issues there, so back to domPDF.
     
  6. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    Unfortunately, PDF generation is kind of hit or miss. We rely entirely on 3rd party libraries to do HTML to PDF conversion, and none of them are perfect (or even barely adequate). DOMPDF does some things better, MPDF does some thing better, but they both have their quirks and issues.

    -- hugh
     
    Nagtegaal likes this.
  7. troester

    troester Well-Known Member Staff Member

    Level: Community
    A possibility to skip domPDF is to create a custom "PDF" link like
    .....&layout=your-PDF-template&tmpl=component&iframe=1
    and let your user create the PDF via browser CTRL-P
     
    Nagtegaal likes this.

Share This Page