prepare a web page so that the client can send to printer
Moderator: General Moderators
prepare a web page so that the client can send to printer
how to prepare a page containing a news article in simple html-tagged format to print to a print device?
- jaoudestudios
- DevNet Resident
- Posts: 1483
- Joined: Wed Jun 18, 2008 8:32 am
- Location: Surrey
Re: prepare a web page so that the client can send to printer
Use the CSS media print option - if you have multiple page it might be tricky. For multiple pages I would suggest creating a pdf.
- volomike
- Forum Regular
- Posts: 633
- Joined: Wed Jan 16, 2008 9:04 am
- Location: Myrtle Beach, South Carolina, USA
Re: prepare a web page so that the client can send to printer
This should be useful to you:
http://www.javascriptkit.com/dhtmltutor ... reak.shtml
However, by default that's not elegant. So, what you do is specify a screen media CSS load rel -- you familiar with that? The load rel will specify one CSS to use for the screen, and then another load rel will specify for the printer. For the screen, take all the page breaks (see link above) and hide each section, letting someone use a click and some jQuery to flip between pages. For the printer, show everything as is. What happens is that when they go to view the page on the screen, they see it like a slideshow of pages. But when they go to print, it prints with proper page breaks.
http://www.javascriptkit.com/dhtmltutor ... reak.shtml
However, by default that's not elegant. So, what you do is specify a screen media CSS load rel -- you familiar with that? The load rel will specify one CSS to use for the screen, and then another load rel will specify for the printer. For the screen, take all the page breaks (see link above) and hide each section, letting someone use a click and some jQuery to flip between pages. For the printer, show everything as is. What happens is that when they go to view the page on the screen, they see it like a slideshow of pages. But when they go to print, it prints with proper page breaks.