ERPNext Conference 2019* ERPNext.com Blog

Custom Print Format print extra page 2


#1

Hi,

I have written a custom print format with page orientation ‘Landscape’ keeping in mind that we will be printing on A4 pages I have set page max height and max width according to a4 dimensions i.e. 8.3 inch and 11.7 inch under styling whose code is:

<style>
@media print {
            @page {size: landscape}
            .print-format {
                max-width: 11.7in;
                padding: 0.25in;
                min-height: 8.3in;
                max-height: 8.5in;
            }
}
</style>

Now, all content is displayed on page 1 but system shows empty 2 page hence everytime we have 1 empty page which is wasting time.

Little help will be highly apprecitated. Thanks.


#2

For PDF and normal print format, I had to reduce the size to

max-width: 11in;
max-height: 8in;

Excessive shrinkage is just to apply adding to working area so in any case page 2 never appears.