Announcement

Collapse
No announcement yet.

Bug in PDF footer when i'm using pageNumber and totalPageNumber tags

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • emillod
    replied
    You're right. Thank you shalmaxb

    Leave a comment:


  • yuri
    replied
    Please, don't provide links to the domo in bug reports. Its lifetime very short.

    Leave a comment:


  • emillod
    replied
    Okay, if you can't fix it - no problem. Wanted to report just in case

    Leave a comment:


  • shalmaxb
    replied
    This works:

    Code:
    <table width="100%" style="border:none; font-size:8px;">
    <tbody><tr>
    <td width="15%" style="text-align: left;"><strong>Test Inc.</strong><br>TAX ID: 1234567890</td>
    <td width="40%" style="text-align: left;">e-mail: contact@domain.com | phone 123 456 789<br>Correspondence address: ul. Test 13/2, 02-123 Warsaw</td>
    <td width="18%" style="text-align: left;background-color:red">Page <br>{pageNumber} from {totalPageNumber}</td>
    <td width="24%" style="text-align: left;">Generated at {{now}}<br>by Johne Doe</td>
    </tr></tbody></table>
    second <td> 5% less. Even if TCPDF uses HTML I guess the parser is not programmed correctly. ​
    Last edited by shalmaxb; 12-04-2022, 04:53 PM.

    Leave a comment:


  • yuri
    replied
    There are millions of possible issues when PDF is generates with TCPDF. If all those will be reported we wouldn't be able to do real things but only fixing unfixable.
    Last edited by yuri; 12-04-2022, 04:51 PM.

    Leave a comment:


  • yuri
    replied
    We don't consider TCPDF peculiarities as bugs.

    Leave a comment:


  • emillod
    replied
    shalmaxb thank you for your response.
    If you have time, you can play with it

    Leave a comment:


  • shalmaxb
    replied
    from my expierience, it could be the <br> before the page number or even the space before that <br> in the code. The PDF editor behaves very strange sometimes.

    Leave a comment:


  • emillod
    replied
    shalmaxb
    no, it's not related:
    Click image for larger version

Name:	image.png
Views:	1343
Size:	18.4 KB
ID:	85932

    Leave a comment:


  • shalmaxb
    replied
    Maybe it is because the sum of your cell % is not 100 %, but the table itself is.

    Leave a comment:


  • Bug in PDF footer when i'm using pageNumber and totalPageNumber tags

    Hello Guys,
    i think that i found a bug. I've created new PDF template on demo.espocrm.com which contain footer with Footer position set to 10. Then i switched Footer editor to code and I've pasted this code:
    HTML Code:
    <table width="100%" style="border:none; font-size:8px;">
    <tbody><tr>
    <td width="15%" style="text-align: left;"><strong>Test Inc.</strong><br>TAX ID: 1234567890</td>
    <td width="45%" style="text-align: left;">e-mail: contact@domain.com | phone 123 456 789<br>Correspondence address: ul. Test 13/2, 02-123 Warsaw</td>
    <td width="13%" style="text-align: left;background-color:red">Page <br>{pageNumber} from {totalPageNumber}</td>
    <td width="24%" style="text-align: left;">Generated at {{now}}<br>by Johne Doe</td>
    </tr></tbody></table>
    I saved template and opened PDF template generated based on Account (if demo will not refresh till now, you can use this link) https://demo.eu.espocrm.com/?entryPoint=pdf&entityType=Account&entityId=5f5f1f cec41c41354&templateId=638cc76a928c298de

    And that's a result:
    Click image for larger version  Name:	image.png Views:	0 Size:	19.1 KB ID:	85926
    I've changed background color of problematic cell to red to show you how big is this cell and it should fill only two lines, instead of three. Even if i remove <br> to get everything into one line, i can't:
    Click image for larger version  Name:	image.png Views:	0 Size:	18.0 KB ID:	85927

    It's also look weird if i switch alignment to right:
    Click image for larger version  Name:	image.png Views:	0 Size:	17.1 KB ID:	85928

    SO:
    cell is big enough to show whole cell in one line, but it doesn't, probably because of tags? If i remove tags and replace them with Page 1 from 1, it looks normal:
    Click image for larger version  Name:	image.png Views:	0 Size:	16.4 KB ID:	85929
Working...
X