dear expertsi 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?

Stevie_D
—
2013-01-11T13:11:44Z —
#2

ifalcons said:

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.

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.

ifalcons
—
2013-01-14T04:04:18Z —
#3

@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.

ralphm
—
2013-01-14T04:57:43Z —
#4

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.

Stevie_D
—
2013-01-14T12:57:22Z —
#5

ifalcons said:

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.

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.

ifalcons
—
2013-01-15T07:23:07Z —
#6

ralph_m said:

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.

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.