I don’t know why and how this is even possible, but when I tried to regenerate an invoice today, it was not possible, I was getting a php error pointing to mPDF. A few days ago, it was working fine, I haven’t changed or updated anything, just suddenly I couldn’t generate an invoice anymore:
A PHP Error was encountered
Message: Undefined index: miw
Line Number: 20794
the strange thing is, that it has worked, but it stopped working. Is there an aprox. release date for the next version? Currently invoiceplane is not usable with this issues (margin not usable and full-size background image hides footer)
@Kovah I’ve updated invoiceplane to 1.5.6 now. Checked on the Backends settings and also the package.json shows the 1.5.6 version.
But the issues are still all in here. Again when adding margins, the page crashed with the “A PHP Error was encountered” message. When margins removed, it works.
Also the background image still hides the footer text. You’ve mentioned you are using a modified version of “mpdf”, so is it modified also in the 1.5.6 version of invoiceplane?
I even don’t know if this is still a bug or only on my side somehow.
Okay @Kovah I need a solution now, I’m fighting with this over two weeks now. Nobody in this community is confirming this issues, seems nobody have these issues or nobody have tested it, You are willing to help, thank you for that, but I need a clear statement like, “yes here, I’ve tested the background and margin stuff and it is working so it must be your setup/or it is not working like you said this is definitely a bug”. I know and recognize it is pointing towards mpdf, as this issues are on generating a pdf.
15 days ago I’ve already submitted an issue on github for mpdf: https://github.com/mpdf/mpdf/issues/619
But as others get an answer very soon, my submit is getting ignored.
So what should I do? Invoiceplane looks very promising to me, but I can’t get it to work (likely just because of mpdf).
@Maxime_GRIMLER yeah sure. It’s almost the default one. I’ve entered here a random url for a background image from the internet. Inside the invoice-details div I’ve a custom field. You can just drop it in case you don’t want to create it as it is not causing the issue. And that’s it.
You will see, if a background image is set, the footer is hidden. The footer is set exactly where I’ve setup the default template in the settings.
I’m curious to know if it will behave the same on your system.
From what I have understand is that there is a calcul in the mPDF library which blocks assigning more than 1.4cm in margin-left.
If you set 1.3cm, then it works and the PDF will generate, if you set 1.4cm and more then it will throw the exception.
To be honest the file is really really big at mPDF and it would take me ages to understand the real problem.
I would be you I would contact (again sorry) mPDF via the issue tracker (maybe a new issue now we have more data ?) and also in stackoverflow http://stackoverflow.com/questions/tagged/mpdf
I can’t explain why from one day to another it stopped working …
If 1.3cm is enough for you then say hurra and have fun, if not I’m sorry but I won’t have time to debug mPDF
@Maxime_GRIMLERbackground-image I’ve looked through the issues but haven’t seen this one. Okay yeah, background on body is possible, but not with the pseudo selector :first. Which isn’t that bad, I can work around that, to use only one background.
margin-left, yeah you are right, for 1.3cm it won’t crash, but this is really useless. It can’t be set on body, so I’ve set it on @page but as soon as I add a margin, it doesn’t matter if top, left, right or bottom, the background which is set on body disappears. mPDF seems really broken/buggy if you ask me.
Never mind, you InvoicePlane guys are doing a great job, I will see what I’m going to do now, maybe a last issue submit, if I’m getting ignored again, then I will have to to look for another invoicing application