SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Jan 2013
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lightbulb 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?

  2. #2
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,892
    Mentioned
    123 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by ifalcons View Post
    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
    Code CSS:
    @page {size:8.5in 11in; margin: 2cm;}
    but how effective or widely supported that is, I couldn't tell you.

  3. #3
    SitePoint Member
    Join Date
    Jan 2013
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @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.

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,319
    Mentioned
    462 Post(s)
    Tagged
    8 Thread(s)
    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.

  5. #5
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,892
    Mentioned
    123 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by ifalcons View Post
    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.

  6. #6
    SitePoint Member
    Join Date
    Jan 2013
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    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.
    Result-card.jpgSummarySheet.jpg

    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.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •