Custom Page Size For Printing


I’m using custom paper size - continuous form with 1/2 A4 size. I’ve added this custom size in the printer setting.

When trying to print sales invoice, it seems the default scale is still A4, so it’s is too large. E.g. With only 3 items, it became 2 pages.

But if i generate to PDF file first, then open the PDF file then choose my custom page size…then I can print fine in my custom size (1/2 A4).

In my template, I have added:

	.print-format table, .print-format tr, 
	.print-format td, .print-format div, .print-format p {
		font-family: Monospace;
                font-size: 8;
		vertical-align: top;
	@media screen {
		.print-format {
			width: 8.5in;
			padding: 0.10in;
			min-height: 5.5in;

Anybody has some hints?


I added style line-height:50% and use <small> tag for for entire document… It seems to be working for me to get 1/2 A4 print-out. But I don’t know whether this is the proper way to adjust print-size in ERPNext.

Perhaps others may have better solution.



First off, Thanks for the Code and tip

I am trying to similar thing, to create custom page size for Delivery Note, 8.5in x 5.5in printed on a dot-matrix printer. I got similar results

In my print format I can have 5 items, if there are more items I want it to come on the next page leaving space for the letter head which comes built on the paper. Is it possible to do that?


There is a Page Break property in the Item row for most forms, you will have to check that manually.

Sorry for the delay, I was trying something out,

Thanks for the tip. Let me give this a go and see

Hi, I need something similar, what’s your solutions for this ?

@alan I re purposed the code used in the link below