Paper type useing css

dear experts
i am new in this fourm i want to set paper type with css. like A4, B4, B5, Legal, Letter

Actually I have already get and set data from MySql by using php. I have already set data by using CSS. I have done all its settings I means when I click print commend I can take print on paper correctly. Now I want to set paper type because I want to take some reports on A4 paper type and some on legal paper type.

Can anybody help me for this?

[font=verdana]I’m assuming that this is some kind of internal system rather than a public website.

The problem with what you’re asking for is that changing the CSS won’t change the physical paper that is in someone’s printer. So setting a page to use Letter paper will be unhelpful and counter-productive if they actually have A4 paper loaded. If you could give a bit more background about how your system works and how it switches between paper sizes, that might help.

You can suggest to the browser that is aims for a particular size of paper with the line

@page {size:8.5in 11in; margin: 2cm;}

but how effective or widely supported that is, I couldn’t tell you.[/font]

@Stevie D… first of all thanks for the reply and asking me
Yes it is internal reporting system and currently running in local environment. Actually it is school management system. We don’t want to use Letter type paper. We will only use two type of papers A4 and Legal. Some reports will print on A4 and some on Legal. We will ask to the use to select the paper type before sending print commend. Legal will use only those types of reports that contain detail like monthly attendance sheet. In this report one column have name of student and all other have date of month. This report will be landscape.

I think it is lot of detail for under standing the reporting system.

Would it be possible to provide these docs as PDFs? Format them so that the content will fit on any paper size. Sure, they may have big/small margins on some paper sized, but heck, in the end it’s the information that’s important.

If the user has to select the appropriate paper type in the print options then there’s nothing you need to do with the CSS – you can just assume that the one type of report is being printed on A4 and the other one landscape Legal. If you want to be really sure, you could put a strapline across the top reminding people to select the right type of paper, and then hide it with display:none; on the print stylesheet.

i have attached both type reports that we want most. Result card will be print on A4 paper type and summarysheet will be print on Legal paper type. I did it manual, page type selection, but I want it dynamically that will not set from printer property.