CSS Printing Page Orintation problem


i need to fill the salaries of each employee in to company payslips using php.
the format of the payslip has been attached.

The payslips are printed in continues sheets having the width of 11 x 5.5 inches.
We have Epson LQ-2180 for printing.

i have the following css

<style type="text/css">
@page { 
    size:11in 5.5in;
    margin: 0.5cm;

now in google chrome and in IE, the print preview shows the page size and shape correctly as like in the slip (see the chrome print preview attachments ).

but when i feed the slips and prints, the values are printed in horizontal fashion.

i tried size:portrait and size:landscape, no effect :rolleyes:

@page { 
    size:11in 5.5in;
    margin: 0.5cm;
    size:landscape; //tried portrait also. no effect.

i also tried the built printer properties ‘Landscape’ orintation, nop no use.

[font=verdana]Support for printing CSS is pretty poor across the board. There are a few things you could try, off the top of my head, but I can’t promise that any of them will work!

[list][]combine the two lines into one: size: {11in 5.5in landscape;}
]Go into the printer settings and change it to landscape in there
[*]Print the pages to PDF rather than paper, and then print the PDFs[/list][/font]

Print to pdf seems giving me a new life in this project.
time to leave office :slight_smile: morning ill try this and defensively come back with the feedback.
Thanks steve!

Nop :slight_smile:
there is nothing much in the pdf print dialog it self. same problem remains.
i manage to get the orientation problem solved by choosing the "system print dialog’ and define a custom paper that matches the size of our payslip and works charm. the problem now remaining is, after printing one page, then the paper keeps rolling to another 3 or 4 slips then prints the second page (if have).
dont no how to stop this printer paper rolling :frowning:

Thank you, This problem now solved.
when printing a custom size page, we need to define the custom page size in the system print dialog box and should select this paper under "Paper quolity’ > ‘advance’ settings in the print dialog it self.