Invoice Theme Print Size and PDF export problem

Hi there Tut and Lubos, and the rest, long time no see! :slight_smile:

I have the following situation here:

I am seeing the invoice on screen like this:

When I try to print it, it doesn’t fill the whole page:

And when i am exporting as PDF, i get a full A4…
BUT without the company logo:

The code for the invoice is here (don’t mind the greek in the code, it’s supposed to handle all but greek invoices):

{%- if title != 'Τιμολόγιο' and title != 'Πιστωτικό Τιμολόγιο' and title != 'Τιμολόγιο Αγοράς' -%}

   <img src="{{business.logo}}" style="max-height: 160px; max-width: 100%; border-width: 5px; border-color: #a7d3f1;">
   <table style="background-color: #FFFFFF;">
            <td colspan="99">
                <div style="font-weight: bold; font-size: 24px; padding: 20px; text-align: center; margin-bottom: 20px; color: #1B6DA2">{{ title | replace: "Statement", "Customer Statement" }}</div>
                <table style="margin-bottom: 20px"><tr>
                    <td style="padding-left: 30px">
                        <div><b>{{ }}</b> </div>
                        <div>{{ recipient.identifier }}</div>
                        <div>{{ recipient.address | newline_to_br }}</div>
                    <td style="padding-right: 30px; text-align: right">
                        {% for field in fields %}
                        <div style="font-weight: bold">{{ field.label }}</div>
                        <div style="margin-bottom: 10px">{{ field.text }}</div>
                        {% endfor %}

                <div style="font-size: 14px; font-weight: bold; margin-bottom: 20px; padding: 0px 30px">{{ description }}</div>
            {% for column in table.columns %}            
            <td style="font-weight: bold; color: #1B6DA2; background-color: #ffffff; border-bottom-width: 5px; border-color: #a7d3f1; padding: 10px; text-align: {{ column.align }}{% if forloop.first %}; padding-left: 30px{% endif %}{% if forloop.last %}; padding-right: 30px{% endif %}{% if column.nowrap %}; white-space: nowrap; width: 80px{% endif %}">{{ column.label }}</td>
            {% endfor %}
        {% for row in table.rows %}
            {% for cell in row.cells %}
            <td style="padding: 10px; text-align: {{ table.columns[forloop.index0].align }}; border-color: #C2CBCE; border-bottom-width: 1px{% if forloop.first %}; padding-left: 30px{% endif %}{% if forloop.last %}; padding-right: 30px{% endif %}{% if table.columns[forloop.index0].nowrap %}; white-space: nowrap; width: 80px{% endif %}">{{ cell.text | newline_to_br }}</td>
            {% endfor %}
        {% endfor %}
        {% for total in table.totals %}
            <td colspan="{{ table.columns | size | minus:1 }}" style="padding: 10px; text-align: right{% if total.emphasis == true %}; font-weight: bold; font-size: 16px{% endif %}">{{ total.label }}</td>
            <td style="border-bottom-width: 0px; border-color: #C2CBCE; white-space: nowrap; padding: 10px; padding-left: 30px; text-align: right; padding-right: 30px{% if total.emphasis == true %}; font-weight: bold; color: #1B6DA2; background-color: #fff; font-size: 14px{% endif %}">{{ total.text }}</td>
        {% endfor %}
        <tr><td colspan="99">
            <div style="border-width: 5px; ; border-color: #a7d3f1; font-size: 11px; margin-top:30px; padding: 10px 20px; background-color: #1B6DA2; color: #FFFFFF">
                    <div style="font-weight: bold; font-size:13px">
                        A.VLACHOS & Co GENERAL PARTNERSHIP
                    <div style="font-size:11px">
                        Kiss FM 100.6 Kefalonia - Radio Station - 13 Ant.Ampatielou Str. - 28100 Argostoli Kefalonia Greece<br> 
                        Tel.: +30 26710 27666 - email: - VAT Number: 099850148 - Tax Office: Argostoliou

{% endif %}

I am having similar problem with my Greek Invoices, but at least i am solving it by exporting to PDF.

Am I missing something?

The only thing you are missing is understanding that onscreen, print, and PDF renderings of a Manager page are all created by different processes under the control of different systems. Manager is not a what-you-see-is-what-you-get application. The first is rendering of HTML by your operating system display driver, the second is your operating system printer driver, and the third is the internal PDF generator. Do not expect identical results.

The reason the PDF doesn’t work is probably because your logo is too large, not only spatially but possibly in terms of file size. Keep it under 250 KB. You also seem to be using a custom theme, for which you are responsible. This is not a coding forum.

Is this saying that I should not post code in here?

Thank you for your answer and explanation. Have you read my code after all? If you haven’t or don’t know how, it’s ok maybe someone will do, and could help me. Unless it’s against the forum rules (so i will take the code down).

About the logo:
I know the PDF generator can handle this logo, because i am using it with my Greek themes and it’s working. So if i change theme i get this:

About the page size:

Nevertheless, I am getting a similar result if i try to print. The page height is not a full page, as PDF does. This FORCES me to export ALL my invoices to PDF first.

I used some of Manager’s pre-installed themes for creating our own. So i had to try one of the pre-installed themes and here is “Smooth Black 1”:



Never mind the logo, probably it’s something wrong with my code.

But for the page height, clearly it’s a pre-installed theme problem, because the footer must be a footer and not get printed in the middle, event if the invoice only has 1 line.

Something has changed in the course of time, because these themes that are pre-installed are from an old version o Manager, where they worked just fine. Maybe they are from the time of “View Templates”.

So an update to the themes must happen.

In a search i found a post of yours saying:

That was the reason I posted about in the first place.

So, if nothing has changed from 2017 (and hundredths or thousands versions of Manager) the PDF creator gets it’s page size from the email settings (which in my case is A4). The question is: why the pre-installed themes aren’t.

No. As a forum moderator, it is not my role to debug your code. And this forum is not the place to learn how. This forum is focused on the accounting applications of Manager.

As I said, you have different display processes. Different drivers interpret the underlying HTML differently when it comes to how they use available page space. That has nothing to do with Manager.

That response was more than two years old, from a time when themes were downloaded from a web site, not built in. I would consider almost anything in it potentially obsolete.

That part is still true. But overall sizing for A4 or USLetter paper is different from how the various drivers fill up that available space.

The totality of your answer, seems a bit snappish. Not only in my post, but in the others, concerning custom themes. You must have been short on time, so you are getting to the point quickly.

The volume of custom themes posts here, should concern the developer, (maybe a custom editor should arise to a future version).

Well it’s time for the team to update them. Unless you are saying here, that officially Manager has only ONE invoice template that is working: the “Plain”.

If they are obsolete, then take them out of the program. And answer to everyone using them that they should make their own.

Nobody updates discussions on the forum. They are left visible because they are sometimes useful to people. There are over 14,100 topics, with more than 105,000 posts. They were relevant to forum members at the time, but may not be anymore. Who would you suggest should review and update six year old discussions?

The effort goes into updating the Guides.

I am definitely not saying that. I did not mention that theme in this thread. There are 22 fully functional built-in themes at the present time. But, since no number can ever satisfy everyone, the developer provided the ability to write your own. He did not, however, wish to establish or maintain a training platform for Liquid coding. Plenty of other resources exist on the web.

For your information, the developer has previously written in this forum that he prefers to have only the PDF function. In fact, he once removed the Print function entirely, only reintroducing it because of user demand. He can control how the program behaves with its internal PDF generator. He cannot control how it behaves with your printer driver. So, your complaint that you are forced to export invoices to PDF is actually the developer’s preference.

Ok, probably it’s my bad use of English. I was talking about updating the themes:

And that’s how we got to that:

And that:

And that:

So, you see this:

Isn’t actually 100%. Because -as i previously wrote and posted with a screenshot- when printed, the Footer goes on the middle of the page. So… let me re-quote myself:

For the present version, and how it handles printing differently. Because last time i used them, some hundred versions ago, they where…

but now, they obviously are not.

Or maybe it’s just me. Please test them and post your findings. That could help a lot.

Well, I knew that he would like that function a lot…That’s why i proposed it and gave the idea:

Strange…was a bug, not a bug, could be your drivers…???
It’s the same issue brought up in the following post!!