May 5, 2020 at 4:05 pm #840
Hi, I’m nearly finished fixing up my installation and I’m trying to replicate the pdfs I used to generate under my aging php5 build of Simple Invoices. I’m struggling to work out why float right is ignored when the PDF is rendered, leaving the ‘Invoice Summary’ on the left instead of floating to the right like it does in the HTML preview. Can anyone give me some advice ? I’m hoping @fearless359 might be able to give some pointers 🙂
Thanks all.May 5, 2020 at 4:58 pm #841
I use a style statement with text-align:right;padding-right
May 6, 2020 at 1:45 am #843
- This reply was modified 11 months, 2 weeks ago by RRowley.
Thanks for the input. I tried changing the css so that the .right class shows as;
float: right !important;
and the text in the ‘Invoice Summary’ is right justified, the block is still on the left of the page. It doesn’t seem to matter what I set the ‘padding-right’ to because it never gets applied (it’s always left justified on the page).
I’m assuming that this is a problem for everyone using the default form ?May 6, 2020 at 2:28 am #844
Can you include a picture of what you get and explanation of what you want to see?May 8, 2020 at 1:32 pm #848kdj3112Participant
mPDF does not support nested block elements which overlap (horizontally or vertically) i.e. the inner block must be contained by the outer block’s physical dimensions. width and height are overridden if this is not the case.
you can use this manual from mPDF to find out which attributes are supported.
Cheers,June 3, 2020 at 4:05 am #893
Thanks, that info was very helpful. The forum for some reason doesn’t want me posting images or links.. but I have fixed up the default template so that it looks like the printout under php5.6. Should I submit this to github?June 3, 2020 at 6:48 am #894fearless359Keymaster
No. You can put it in a zip file and submit it here. I’ll check it out at that point.June 3, 2020 at 7:05 am #897June 18, 2020 at 5:54 am #912June 20, 2020 at 6:10 am #913July 1, 2020 at 9:11 am #923
Yup, that’s got it. I recommend this replace the default invoice.July 8, 2020 at 2:57 am #925
..having said that, the PDF output of the payment info is being lumped together. In the template there are </br> but these are being ignored when the PDF is generated. I’ve separated each line into a separate row in the table, so they appear as intended.
Attachments:July 8, 2020 at 9:48 am #933
Change any occurrence of
<td colspan="6"> </td>
In the case of
<td colspan="6"> <br/> <br/> </td>
<td colspan="6"> </td> <td colspan="6"> </td>
My test shows both the printer render and the PDF render honor this change whereas the PDF render ignores the
<br/>value in a table item definition.
- You must be logged in to reply to this topic.