fearless359 / simpleinvoices

Fearless359 SimpleInvoices beyond great beginnings
https://simpleinvoices.group
GNU General Public License v3.0
28 stars 7 forks source link

PDF not rendered as per the templates #64

Closed ppmt closed 4 years ago

ppmt commented 4 years ago

I am using the latest version of SI (master_2019.2) and noticed that my templates is not rendered well in PDF. Namely that the tables are no longer where they should be. Like beign on the left when it should be on the right.

After a lot of trial I have managed to solve it partially... There are 2 main issues which are all due to limitation in mpdf.

  1. It doesn't seem to support the clear and float css attribute in table.
  2. if you want to use clear and float you must specify the width of the section

see that link for more info https://mpdf.github.io/what-else-can-i-do/floating-blocks.html

To fix I removed I wrapped my tables with a

....
and in the css I added a width for the float

.right {
 float: right;
 width: 50%;
}

it partially fix the problem but there still a need to play with the rest of the class. In the end I had to do the same for the class left and also create a new class for the table that list the invoices so that it uses a width of 100%