If the invoice does not fit on A4-sized paper, you need to follow the below steps:
Step 1: Go to Administration, then select Configuration, then select Hardware Configuration. In hardware configuration, shrink printing to % and set the top and left margins.
Step 2: Then you have to check page set-up settings from Administration, then select Configuration,
Step 3: then select Invoice or Document Printing, then select Advanced.
Step 4: Then select the invoice format, and in the invoice format, you will find the page set-up setting, in which you will set the number of lines for the page setting.