• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

Problem with css for custom PDF-template that include calculations.

Status
Not open for further replies.
Hi,
I have my own Front-end-template for list:
/com_fabrik/views/list/tmpl/default-2015-12-14-table-zlicz-pakiety-pdf1
this works as i need

I created also small modification of this template:
/com_fabrik/views/list/tmpl/default-2015-12-14-table-zlicz-pakiety-pdf1-printout
that i use as PDF-template

I have problem for lines with fabrik calculations, that are in default.php
one sample of this code is:
PHP:
<?php  $j=0;
                        foreach ($this->calculations as $cal) {
if($j>=3 and $j<= 7)  {
                                 echo '<tr class="fabrik_calculations fab1_danka" >';
                                        echo "<td>";
                                        echo array_key_exists($groupedby, $cal->grouped) ? $cal->grouped[$groupedby] : $cal->calc;
                                        echo "</td>";
                                        echo  "</tr>";
}
$j++;
}
echo " <div class='podkr1' style='margin-top: -7px; margin-bottom: -13px; text-align:right;'>  </div>";
This generates lines for device-pieces called:
Pakiet przetwornika
...
Pakiet Backplane
as you can see on screenshoots.

I use custom_css.php
and css stylling for those calculations:
HTML:
.fabrikForm  dt, .fabrikForm dd.splittotal  {
clear:left;
  width:282px;
font-weight: bold !important;
text-decoration: underline !important;
color: red !important;
text-align: left;
padding: 3px;
margin-bottom: -2px;
float:left;
}

.fabrikForm dd {
/* dankam  width:350px; */
/*  width:475px; */
  width: 100%;
  color: red !important;
  font-weight: bold;
  padding: 0px;
  margin-top: -60px;
/* dankam testy tu sa pogrubione ilosci w kolorze czerwonym  margin-left: -50px; */
}

.fabrikForm   dd span.calclabel {
  color: blue !important;
  font-weight: normal !important;
}

.fabrikForm  dd.splittotal {
font-weight: normal !important;
font-style: italic;
}

.fabrikForm  td {
margin-top: -60px !important;
}

.fab1_danka
{
  text-align: right;
}

.fab1_danka .calclabel {
float: left !important;
text-align: left !important;

}

This what works nice for list-view, doesn't work for PDF template.

I need:
(calclabel), color:blue ----> on the left
(values=numbers), color:red ---->on the right

Have no idea how to do this.

Please help with any advice.
 

Attachments

  • Zaznaczenie_135.png
    Zaznaczenie_135.png
    115.3 KB · Views: 1,011
  • Zaznaczenie_136.png
    Zaznaczenie_136.png
    84.9 KB · Views: 743
  • Zaznaczenie_137.png
    Zaznaczenie_137.png
    50 KB · Views: 651
  • Zaznaczenie_139.png
    Zaznaczenie_139.png
    90.2 KB · Views: 782
I really can't help. As you now DOMPDF is a 3rd party library, and we just provide a "best effort". We hand the same HTML and CSS we display in the PDF debug view to DOMPDF. Any issues with formatting after we hand off to DOMPDF are out of our control.

When did you last update the DOMPDF library, btw? As Troester mentioned, there was an update to DOMPDF a couple of years ago which improved it greatly.

-- hugh
 
I have Git Hub version 01-07-2015 (01 July 2015) 3.09 for Joomla 2.5.
I am not sure if DOMPDF library is actualized (automatically) together with git hub actualization?
 
Is domPDF can't handle also text-align: left; or text-align: right; ?

in that case all what i can do is:
PHP:
fabrikForm   dd span.calclabel {
  color: blue !important;
  font-weight: normal !important;   
  margin-right: 250px !important;
  text-align: left !important; 
}

works only:
margin-right: 250px !important;

And i get this what is on screenshoot.
 

Attachments

  • Zaznaczenie_143.png
    Zaznaczenie_143.png
    137.2 KB · Views: 885
Troester, was it you who was playing around with wkhtmlpdf a while back?

Sent from my Nexus 7 using Tapatalk
 
Troester:
Now, i have in my custom_css.php code:
PHP:
.fabrikForm   dd span.calclabel {
  color: black !important;
  font-weight: normal !important;
text-align: left !important;
display:inline-block;
left:100%;
width:95%;
margin-left: -38px;
}

And all is printed on my PDF like i need.
Many thanks!
 

Attachments

  • Zaznaczenie_145.png
    Zaznaczenie_145.png
    125.7 KB · Views: 650
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top