Float Right ?

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #840
    ExpertGeeks
    Participant

    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.

    #841
    RRowley
    Participant

    I use a style statement with text-align:right;padding-right

    • This reply was modified 3 years, 11 months ago by RRowley.
    #843
    ExpertGeeks
    Participant

    Thanks for the input. I tried changing the css so that the .right class shows as;

    .right {
    text-align:right;
    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 ?

    #844
    RRowley
    Participant

    Can you include a picture of what you get and explanation of what you want to see?

    #848
    kdj3112
    Participant

    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.

    mPDF supported CSS attributes

    Cheers,

    #893
    ExpertGeeks
    Participant

    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?

    #894
    fearless359
    Keymaster

    No. You can put it in a zip file and submit it here. I’ll check it out at that point.

    #897
    ExpertGeeks
    Participant

    Here you go.. 🙂

    Attachments:
    #912
    ExpertGeeks
    Participant

    Hi @fearless359,

    Did you get chance to check out the invoice ?

    #913
    RRowley
    Participant

    Try this.

    #923
    ExpertGeeks
    Participant

    Yup, that’s got it. I recommend this replace the default invoice.

    #925
    ExpertGeeks
    Participant

    ..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:
    #933
    RRowley
    Participant

    Change any occurrence of
    <td colspan="6"><br/></td>
    to
    <td colspan="6">&nbsp;</td>

    In the case of

    <td colspan="6">
        <br/>
        <br/>
    </td>

    to

    <td colspan="6">&nbsp;</td>
    <td colspan="6">&nbsp;</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.

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.