Any workaround on invoice page size

is there workaround on invoice page size i tried it by printer functionality but it rather ran out of page.
it skips the lines below the page size rather shifting these lines to 2nd page.


if i fit it according to page size it reduces the font size to much i.e no readable easily

scaled on 62%
page size is 5.5*8

I save them as pdf and use the autoresize function of Adobe reader

@Davide m also using and saving it as pdf, but can’t get the required results. can u please help me?

@Ajmal.khan what are “the required results”? You can post screenshots what you see vs what you expect when clicking on PDF button.

sir @lubos , actually i need to print my invoice on page size 5.5*8 and it always takes it Letter size. what i actually wish to print is i.e if it can print only 10 rows of sale invoice on one page according to the provided size it should transfer automatically the rest of the lines to 2nd page for convenience with same invoice number logo and rest.

I see. Currently only A4 and Letter size is supported. What is the paper size you are printing on? A5?

actually it is half of A4 size from landscape side that is 5.5x and 8Y (5.5*8) exactly, butt A5 may serve the purpose i think

managed to do upto some extent by altering some theme references but still failed to manage number of iterations in loop to keep some fixed number of iterations for row on one page.
image

can someone help it out.
i am totally unfamiliar with coding did it just on hit and trail method and some internet help

    <thead>
        <tr>
         <td colspan="4">
           
                <table style="margin-bottom: 5px; padding-left:140px; padding-right:140px">
                
                <tr>
                    {% if business.logo != null %}<td style="text-align: center"><img src="{{ business.logo }}" style="max-height: 175px; max-width: 350px"></td>{% endif %}</tr>
                    <td style="padding: 3px;color: #000000;font-family:Goudy Old Style; font-weight: bold; font-size: 32px; background-color: #FF0000; text-align: center">{{ 'Sales Invoice' }}</td>

                </tr></table>
                
                <table style="color:#000000; margin-bottom: 0px; padding-left:145px; padding-right:145px"><tr>
                    <td>
                        <div><b>{{'Customer Name: '}}<u>{{ recipient.name }}</u></b> {{ recipient.code }}</div>
                        <div>{{'Address:' recipient.address}}</div>
                        <div>{{ recipient.identifier }}</div>
                    </td>
                    <td style="color: #000000; padding-left:0px; padding-right: 0px;text-align: right">
                        {% for field in fields %}
                        <div style="font-weight: bold">{{ field.label }}</div>
                        <div style="margin-bottom: 0px">{{ field.text }}</div>
                        {% endfor %}
                  
                </tr></table>

                <div style="color: #000000; padding-left:145px; padding-right:145px; font-size: 14px; font-weight: bold; font-weight:italic; font-family:Book Antiqua; margin-bottom: 5px">{{ description }}</div>
            </td>
        </tr>
        <table style="padding-left:145px; padding-right:145px">
           
            <td style="font-weight: bold; color: #000000; padding: 5px 10px; text-align: center; border-left-width: 1px; border-bottom-width: 1px; border-top-width: 1px; border-right-width: 0px">#</td>
            {% for column in table.columns %}            
            <td style="font-weight: bold; color: #000000; font-weight:italic; font-family:Book Antiqua; padding: 5px 10px; text-align: {{ column.align }}; border-left-width: 1px; border-bottom-width: 1px; border-top-width: 1px{% if forloop.last == true %}; border-right-width: 1px{% endif %}{% if column.nowrap %}; white-space: nowrap; width: 80px{% endif %}">{{ column.label }}</td>
            {% endfor %}
        </tr>
    </thead>
    <tbody>
        {% for row in table.rows %}
        <tr>
        <td style="padding: 5px 10px; color: #000000; text-align: center; border-left-width: 1px; width: 1px">{{ forloop.index0 | plus:1 }}</td>
       
            
            {% for cell in row.cells %}
            <td style="padding: 5px 10px; color: #000000; border-bottom-width: 1px; font-weight:italic; font-family:Book Antiqua; text-align: {{ table.columns[forloop.index0].align }}; border-left-width: 1px{% if forloop.last == true %}; border-right-width: 1px{% endif %}{% if table.columns[forloop.index0].nowrap %}; white-space: nowrap; width: 80px{% endif %}{% if forloop.last == true %}; border-top-width: 0px;  {% endif %}">{{ cell.text | newline_to_br }}</td>
            
            {% endfor %}
        </tr>
        {% endfor %}
        <tr>
        <td style="border-bottom-width: 1px; border-left-width: 1px">&nbsp;</td>
        {% for column in table.columns %}            
            <td style="border-bottom-width: 1px; border-left-width: 1px{% if forloop.last == true %}; border-right-width: 1px{% endif %}">&nbsp;</td>
        {% endfor %}
        </tr>
        
        {% for total in table.totals %}
        <tr>
            <td colspan="{{ table.columns | size }}" style="padding: 5px 10px; font-weight:italic; color: #000000; font-family:Book Antiqua; text-align: right{% if total.emphasis == true %}; font-weight: bold{% endif %}">{{ total.label }}</td>
            <td style="border-left-width: 0px ;border-top-width: 1px;  background-color: #DDDDDD; color: #000000; border-color: #ffffff;  font-weight:italic; font-family:Book Antiqua; white-space: nowrap; border-right-width: 0px; border-bottom-width: 1px; padding: 5px 10px; text-align: right{% if total.emphasis == true %}; font-weight: bold{% endif %}">{{ total.text }}</td>
        </tr>
        {% endfor %}

        {% for field in custom_fields %}
        <tr>
            <td colspan="4">
                <div style="padding-left:0px; color: #000000; padding-right:0px; font-weight: bold; font-weight:italic; font-family:Book Antiqua; padding-top: 20px">{{ field.label }}</div>
                <div>{{ field.text | newline_to_br }}</div>
            </td>
        </tr>
        {% endfor %}
        
         {% if emphasis.text != null and emphasis.positive %}
        <tr><td colspan="99"><div style="text-align: center; font-family:Americana; font-weight:italic; margin-top: 20px; margin-bottom: 40px"><span style="color: #006400; border-width: 5px; border-color: #006400; padding: 2px; font-size: 20px">{{ emphasis.text | upcase }}</span></div></td></tr>
        {% endif %}

        {% if emphasis.text != null and emphasis.negative %}
        <tr><td colspan="99"><div style="text-align: center; font-family:Americana; font-weight:italic;  margin-top: 20px; margin-bottom: 40px"><span style="color: #FF0000; border-width: 5px; border-color: #FF0000; padding: 2px; font-size: 20px">{{ emphasis.text | upcase }}</span></div></td></tr>
        {% endif %}
            
    </tbody>
</table>

it may be done by altering it i think
{% for row in table.rows %}


        {% for cell in row.cells %}
        <td style="padding: 5px 10px; color: #000000; border-bottom-width: 1px; font-weight:italic; font-family:Book Antiqua; text-align: {{ table.columns[forloop.index0].align }}; border-left-width: 1px{% if forloop.last == true %}; border-right-width: 1px{% endif %}{% if table.columns[forloop.index0].nowrap %}; white-space: nowrap; width: 80px{% endif %}{% if forloop.last == true %}; border-top-width: 0px;  {% endif %}">{{ cell.text | newline_to_br }}</td>
        
        {% endfor %}
    </tr>
    {% endfor %}
    <tr>
    <td style="border-bottom-width: 1px; border-left-width: 1px">&nbsp;</td>
{{ forloop.index0 | plus:1 }}
1 Like

me too having same type of problem… is there any improvement yet?
are they planning for simple html instead of liquid? any information or update?

No.

is there any update on the issue?

something new on invoice page size, is there any chance to wait for

finally, did it by altering some theme code according to my needs and changing printer page setting.
not used a good approach but finally achieved the required results.thanks

can u share how u did achieved that?

yes of course, I increased the font sizes of all in theme and set the printer default page size for the required page size and the set the printer to fit on the page size. it reduces the size but is readable on my page after printing
as on invoice

and on printing on page size 5.5*8

1 Like