WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Site Design > Graphics & Design Discussion Forum > Accessibility and Usability Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Accessibility and Usability Forum Discuss topics related to website accessibility and usability. Subjects include; testing techniques, tutorials, guidelines and legal issues.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-26-2006, 01:47 PM
WebProWorld Pro
 

Join Date: Jul 2004
Location: Irvine, CA
Posts: 120
spenland RepRank 0
Default Printer Friendly Website Script

Hi guys, I'm looking for a script that when the user clicks a print icon, a printer friendly version will be shown that will allow the user to print the page successfully on letter size paper.

I'm using a tableless design with DIV tags and CSS, so I was thinking all I need to do is remove the stylesheet from each page. Is this the best way to go? Do you have any other ideas?
Reply With Quote
  #2 (permalink)  
Old 07-26-2006, 05:02 PM
WebProWorld Veteran
 

Join Date: Aug 2003
Location: Cornwall, UK
Posts: 833
speed RepRank 1
Default

The easiest option is to just create a style sheet for the print, http://alistapart.com/articles/goingtoprint/
__________________
TOLRA Micro Systems Limited US & UK Web Hosting with Continuous Data Protection
Web Directory 2 for 1 Offer : Web Directory Script
Reply With Quote
  #3 (permalink)  
Old 07-26-2006, 05:21 PM
WebProWorld Pro
 

Join Date: Jul 2004
Location: Irvine, CA
Posts: 120
spenland RepRank 0
Default

Thanks Speed that is exactly what I was looking for!
Reply With Quote
  #4 (permalink)  
Old 07-26-2006, 06:23 PM
WebProWorld New Member
 

Join Date: Oct 2005
Location: Greenfield MA USA
Posts: 6
alciere RepRank 0
Default

You might also consider creating a PDF file for the user to download.
__________________
Simon Peter Alciere - affiliate program manager - Simon's Stamps
Reply With Quote
  #5 (permalink)  
Old 07-26-2006, 07:29 PM
WebProWorld Pro
 

Join Date: Jul 2004
Location: Irvine, CA
Posts: 120
spenland RepRank 0
Default

OK scratch that, I'm having some trouble getting this print thing to work properly. Basically my webpage is 900px wide, with a 200px sidebar on the left. I'm making all the images, menus, and sidebar with the display:none property with no problems. The problem is that the text is not wrapping properly, several words get cut off and if I decrease the font I just can fit more words on the line but it still gets cut off! grrrrrrr

My CSS is pretty complicated, I have a mix of relative and absolute DIVs to achieve the look that my company wants. Any advice?
Reply With Quote
  #6 (permalink)  
Old 07-26-2006, 09:49 PM
WebProWorld New Member
 

Join Date: Sep 2003
Location: Hilton Head Island, SC
Posts: 21
ronbaker1 RepRank 0
Default

It's easy - for print pages, I create a "print" style sheet in addition to the "screen" media style page. Usually, I make a copy of the screen style page. And, I set "display:none" for any elements that I don't want on the printed page, such as the navigation bar. I also make minor adjustments in the width(s) to make the content fit a printed page. For example, I make certain the page size fits the dimensions of a print page (around 660px in width for a portrait page).

You've indicated that your web pages are 900px, which means some of your text will not fit on a print page in portrait format. The result is some of the text is "cut off". I don't have your CSS style sheet to confirm my guess, but I suspect you need to reset the widths to fit the typical print page (around 660px).

You should find it fairly easy to tailor the screen style sheet to create a print style sheet, with a few changes.

Ron Baker
www.apex-systems.net
www.hilton-head-property.com
www.hilton-head-real-estate.biz
Reply With Quote
  #7 (permalink)  
Old 07-26-2006, 11:00 PM
DrTandem1's Avatar
WebProWorld 1,000+ Club
 

Join Date: Oct 2003
Location: Encinitas, CA
Posts: 1,908
DrTandem1 RepRank 2
Default

Your web page and your printer-friendly page should be from separate sources. As someone mentioned, converting it to a PDF is a good option.

You need to realize that the print world is far different from the virtual world.
__________________
DrTandem's San Diego Web Page Design, drtandem.com
Reply With Quote
  #8 (permalink)  
Old 07-26-2006, 11:45 PM
WebProWorld New Member
 

Join Date: Jun 2006
Location: Nebraska, USA
Posts: 13
ksawatzk RepRank 0
Default Re: Printer Friendly Website Script

Quote:
Originally Posted by spenland
Hi guys, I'm looking for a script that when the user clicks a print icon, a printer friendly version will be shown that will allow the user to print the page successfully on letter size paper.

I'm using a tableless design with DIV tags and CSS, so I was thinking all I need to do is remove the stylesheet from each page. Is this the best way to go? Do you have any other ideas?
++++++++++++++++
Another thought would be to use 3 pages. A Server-Side Include page with the text, a Style 1 page with the SSI page that would display the way you want for your site layout, and a Style 2 page with the same SSI page with CSS set just for printing. That way you make text changes to the SSI page and never have to touch the layout for either...
Reply With Quote
  #9 (permalink)  
Old 07-27-2006, 04:21 AM
WebProWorld Veteran
 

Join Date: Aug 2003
Location: Cornwall, UK
Posts: 833
speed RepRank 1
Default

Quote:
Originally Posted by spenland
OK scratch that, I'm having some trouble getting this print thing to work properly. Basically my webpage is 900px wide, with a 200px sidebar on the left. I'm making all the images, menus, and sidebar with the display:none property with no problems. The problem is that the text is not wrapping properly, several words get cut off and if I decrease the font I just can fit more words on the line but it still gets cut off! grrrrrrr

My CSS is pretty complicated, I have a mix of relative and absolute DIVs to achieve the look that my company wants. Any advice?
Assuming printing the web page is still what you want to do, without seeing the page in question it's hard to be specific, but as well as using display: none for the bit's you don't want, also change your containers width from 900px to 90%.

Using a % width should make the text wrap to fit but this does depend on what else you have on the page, i.e. a 900px wide image will probably scupper this.

Do you need to absolutely positioned items on the print version? I'm guessing you could leave them in the flow as in your first post you mentioned just removing the style sheet?
__________________
TOLRA Micro Systems Limited US & UK Web Hosting with Continuous Data Protection
Web Directory 2 for 1 Offer : Web Directory Script
Reply With Quote
  #10 (permalink)  
Old 07-27-2006, 06:41 AM
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Location: United Kingdom
Posts: 1,765
TrafficProducer RepRank 1
Default Print out , Hard copy, code Javascript

Print out , Hard copy, code Javascript, Just do the page as-is)

Code:
To Print: <a href="javascript:if (window.print != null) { window.print(); }
 else { alert('Your browser does not support this method of printing.
 Please select Print/File from your Browser Menu.'); }">Click here</a>
 or Select File/Print from your Browser Menu.
PDF could mean they keep a harddrive copy, pass-it on, (Viral Marketing) as well.
__________________
Videos to Watch and Video Publishing
Affiliate Program! Our Affiliate Program Pays 50.00% Business Support
Reply With Quote
  #11 (permalink)  
Old 08-04-2006, 04:04 PM
WebProWorld Pro
 

Join Date: Jul 2004
Location: Irvine, CA
Posts: 120
spenland RepRank 0
Default

Cool thanks for the ideas, I've gotten it to work pretty good except for in IE of course, where it tends to still chop off a bit of text.
Reply With Quote
  #12 (permalink)  
Old 08-20-2006, 01:04 AM
Webnauts's Avatar
WebProWorld 1,000+ Club
 

Join Date: Aug 2003
Location: Worldwide
Posts: 7,399
Webnauts RepRank 3Webnauts RepRank 3
Default

Should the company logo be included in the print version?
Reply With Quote
  #13 (permalink)  
Old 08-20-2006, 08:03 AM
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Location: United Kingdom
Posts: 1,765
TrafficProducer RepRank 1
Default Should the company logo be included in the print version?

Quote:
Should the company logo be included in the print version?
Why not?

and make sure you add a full URL e.g.

http://www.acomputerportal.com

As tags cannot link to website from hard copies.

Some print-outs allow Water-Marks, a faint background image.
__________________
Videos to Watch and Video Publishing
Affiliate Program! Our Affiliate Program Pays 50.00% Business Support
Reply With Quote
  #14 (permalink)  
Old 08-20-2006, 09:29 AM
Webnauts's Avatar
WebProWorld 1,000+ Club
 

Join Date: Aug 2003
Location: Worldwide
Posts: 7,399
Webnauts RepRank 3Webnauts RepRank 3
Default Re: Should the company logo be included in the print version

Quote:
Originally Posted by TrafficProducer
...and make sure you add a full URL e.g. http://www.acomputerportal.com. As tags cannot link to website from hard copies.
That is not true! Did you try to print a page of ours?
Check a print review of your pages, e.g http://www.webnauts.net

Quote:
Originally Posted by TrafficProducer
Some print-outs allow Water-Marks, a faint background image.
I prefer this option instead of a logo. That is just 2 minutes work.

Thanks.
Reply With Quote
  #15 (permalink)  
Old 08-20-2006, 01:55 PM
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Location: United Kingdom
Posts: 1,765
TrafficProducer RepRank 1
Default print review of your pages, e.g http://www.webnauts.net

print review of your pages, e.g http://www.webnauts.net

I see a footer with the complete, (of the page to be printed), URL. No other URL's within the page are fully printed.

(This works for other sites as well)

Have you tried this with filenames with underscores in the name e.g. page_two.html etc??
__________________
Videos to Watch and Video Publishing
Affiliate Program! Our Affiliate Program Pays 50.00% Business Support
Reply With Quote
Reply

  WebProWorld > Site Design > Graphics & Design Discussion Forum > Accessibility and Usability Forum
Tags: , , ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Search Engine Optimization by vBSEO 3.2.0