Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Oct 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    printing data from web page to preformated A4 size paper

    Hi frieds,
    I have a problem at my work place to be solved.There is an asp webpage which displays 5 records from database.The web page is having print buton.We have to write a program in such a way that if user presses this button .each record has to be printed on a seperate a4 size preformated paper.Can you please give me sample code to that in ASP or with using CSS.
    Waiting for your post
    regards
    sekhar

  • #2
    Senior Coder
    Join Date
    Dec 2004
    Location
    Essex, UK
    Posts
    2,636
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well firstly you could to set up a print stylesheet which will be used only for printing. You don't have to but it would be easier to keep the styling for the printed page and the screen page seperate.

    <link rel="stylesheet" type="text/css" href="print.css" media="print" />

    In that stylesheet you'll be able to define how the page should print (use Print Preview to check how it looks).

    You can use the CSS property page-break-before:always to force a page-break before an element.


  •  

    Posting Permissions

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