Blank page and item list problem in pdf after customizing Quotation Item frields

Hello, I’ve tried to enable the item_name and description in print view for quotations so I customized the form for Quotation Item and everything seems to appear correctly when I click the printer icon on the quotation.

However when I click the pdf button the result is broken. The last item in 2nd page doesn’t align like the rest, and the item code,name and description drop in the 3rd page instead of starting in the proper line.

Also the totals fall right on the table items. There’s also a 4th extra blank page with it.

Here’s the html code generated in the description fields from that item

Πακέτο φιλοξενίας - Lite Package
<br><b>Περιλαμβάνει:
</b>
<ul>
    <li>500ΜΒ Xώρο στον δίσκο για την φιλοξενία των αρχείων του ιστοτόπου.</li>
    <li>1 Domain</li>
    <li>5 Διευθύνσεις εταιρικών email</li>
    <li>PHP FCGI - PHP FPM</li>
    <li>Nginx ή Apache</li>
    <li>ISPConfig Control Panel</li>
</ul>

and here’s a link to the file
http://tempsend.com/5606530DBD

I’m running ERPNext in a VMWare Debian 8 Jessie x64 machine and I’ve installed all prerequisites as per the guide in:

Changing the order of the items just causes the error to happen later and the totals to fall on that item. Using plain text on the description field but of the same size doesn’t produce an error. Keeping the HTML without < b r > and < b > doesn’t produce an error. Consecutive line breaks do produce the same error though. Any ideas what I can do to troubleshoot this one?

Thanks in advance

EDIT

After more tests I realized that this problem happens when the item field column tries to expand to the next page due to it’s text size whether it’s just consecutive plain text or html.

OK to answer part of my question adding

table tr {
        page-break-inside: avoid !important;
}

near line 93 at

"apps/frappe/frappe/templates/styles/standard.css" 

solved the problem of the overlapping elements in the bottom. However I still get an extra blank page in the end.

I’m updating my question and closing the issue. After a lot of digging up the problem comes up when it’s a local server and you haven’t used your hosts file in the server to set up the pseudo-domain to be accessible from the server.

So for future reference to others who might encounter this issue I solved it by

  1. adding to the hosts file the pseudo-domain so that it is accessible in the server

  2. and also use the command

    bench set-url-root {sitename} http://{hostname_that_resolves_the_site}

1 Like