www.webdeveloper.com
Results 1 to 5 of 5

Thread: Printing website content.

  1. #1
    Join Date
    May 2007
    Posts
    184

    Printing website content.

    Hey guys.
    Right now I have a multiple page website that pulls it's content from a database. What I want to do is create a link in the main header (the part that is displayed on every page) that will print all the content within the whole website at once. Basically I want to pull all the info and put it into one webpage (with a print format) and then print it, BUT I don't want to display that print webpage. Whenever the user clicks the link to print, then it will print the print formatted webpage without sending the user to that page. I don't want the user to have to print each page seperately, but I also don't want the user to be able to view the print formatted webpage. Can anyone give me some ideas?

  2. #2
    Join Date
    Nov 2003
    Location
    Jerryville, Tejas
    Posts
    11,715
    Unless the printer to which you refer is connected to your web/app server you can't do what you describe.
    "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan

  3. #3
    Join Date
    Mar 2005
    Location
    Sydney, Australia
    Posts
    7,974
    The closest you can get to what you want would be to display the page with everything in it so that your visitors can print it.
    Stephen

  4. #4
    Join Date
    May 2007
    Posts
    184
    Quote Originally Posted by felgall
    The closest you can get to what you want would be to display the page with everything in it so that your visitors can print it.
    Well that's basically what I wanted to do but without actually displaying it. I know I can use window.print() to print it automatically but I was trying to figure out how not to display any of it.

  5. #5
    Join Date
    Mar 2005
    Location
    Sydney, Australia
    Posts
    7,974
    Unfortunately, if you don't display the page then it can't be printed.
    Stephen

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles