plainblack.com
Username Password
search
Bookmark and Share

    
Goto page «Previous Page   1 2    Next Page»

Print Stylesheet

User serif
Date 10/26/2009 1:35 pm
Views 1604
Rating 1    Rate [
|
]
Previous · Next
User Message
serif

While working on the "Make Page Printable" style template, it occurred to me that it would probably be more useful to have a default print stylesheet included on every page of a site, perhaps in the head.tags template variable. I think this would be used more than an alternate style template. Considering that the default "Make Page Printable" template had a hard-coded copyright date of 2004, I'd wager it isn't used very much ;)

You can see my initial work here.

It's difficult to create this without standard naming conventions for asset controls and forms, but what I have is probably a decent start. I'm using a customized version of the Blueprint CSS Framework's print stylesheet.

Any thoughts? Does anyone actually use the "Make Page Printable" style template?

Tessa Harmon

Knowmad Technologies



Back to Top
Rate [
|
]
 
 
roryzweistra

We use it for just one site. I believe the number of people printing webpages is getting smaller everyday so a default print stylesheet sounds good to me.

However, for this to be accomplished I believe some perl programming has to be done. So if we are creating a RFE for it, why not create a PDF module?

A PDF of the page will be created by clicking on a PDF icon (or print me button, etc....). After clicking on it, it either opens up in a browser window (I thinks this depends on if you have the Adobe PDF browser plugin installed), or it can be downloaded to your computer. In both cases the user can decide to just have it on screen or hit the print button in your PDF reader.

---------------------------------------------------------------

Rory Zweistra

Oqapi Software

www.oqapi.nl



Back to Top
Rate [
|
]
 
 
knowmad
knowmad

I like the direction of this conversation! Although I disagree about people not printing pages, I can safely say that of all the sites I've developed, I've never used the Printable Style option. It'd be easy to add a macro to insert a print page button which uses a stylesheet.

A PDF print option would make a nice RFE. Let me know if you add that and I'll put some karma towards it. Would this necessary need another template or could it be generated using the Style Template?

 

William



Back to Top
Rate [
|
]
 
 
rogier

While working on the "Make Page Printable" style template, it occurred to me that it would probably be more useful to have a default print stylesheet included on every page of a site, perhaps in the head.tags template variable. I think this would be used more than an alternate style template. Considering that the default "Make Page Printable" template had a hard-coded copyright date of 2004, I'd wager it isn't used very much ;)

You can see my initial work here.

It's difficult to create this without standard naming conventions for asset controls and forms, but what I have is probably a decent start. I'm using a customized version of the Blueprint CSS Framework's print stylesheet.

Any thoughts? Does anyone actually use the "Make Page Printable" style template?

Tessa Harmon

Knowmad Technologies

I have used the "make page printable" once. It effectively just removed the background images (photos) from the header and footer. I don't expect to use it very often, but if I do, I would consider using the screen stylesheet and add this:

* {
background:#fff !important;
color:#000 !important;
border-color:#000 !important;
}

Which should make the whole page black and white and remove all background images, but keep positioning, fonts etc. But it may not be a good solution here, since you might want some of the background images to show up in print.

Rogier | United Knowledge
www.unitedknowledge.nl · www.webgui-help.nl



Back to Top
Rate [
|
]
 
 
knowmad
knowmad

I have used the "make page printable" once.

Sounds like another vote for the death of this style option.

 

 

But it may not be a good solution here, since you might want some of the background images to show up in print.

I think that'd be a good default to use which could then be overridden, as Tessa suggests in her post, via head.tags.

 

Thanks,
William

----
Knowmad Technologies
http://www.knowmad.com



Back to Top
Rate [
|
]
 
 
rogier

Sounds like another vote for the death of this style option.

Well, I wouldn't fight against removing it. But it doesn't really cause any problems, so I think there are other issues more worth the effort.

We can just make a nice, simple default template for it.

But it may not be a good solution here, since you might want some of the background images to show up in print.

I think that'd be a good default to use which could then be overridden, as Tessa suggests in her post, via head.tags.

You just gave me a good argument not to use it: trying to override it will just leave you with a stylesheet full of "!important" rules.

Also, come to think of it: does the print style need to have the head.tags var if it has a default print stylesheet?

Rogier | United Knowledge
www.unitedknowledge.nl · www.webgui-help.nl



Back to Top
Rate [
|
]
 
 
serif

You just gave me a good argument not to use it: trying to override it will just leave you with a stylesheet full of "!important" rules.

Also, come to think of it: does the print style need to have the head.tags var if it has a default print stylesheet?

I'm imagining that the print stylesheet will be general enough that it won't be difficult to override. I think we should keep head.tags in order to allow a designer to add their own customizations.

As long as the head.tags variable is loaded after the default print stylesheet, a designer can write his own rules using the same or more specific selectors and those will take precedence, so !important shouldn't be needed in most cases.

Tessa Harmon

Knowmad Technologies



Back to Top
Rate [
|
]
 
 
serif

But it may not be a good solution here, since you might want some of the background images to show up in print.

I don't see this as a huge concern, because most browsers are configured not to print CSS background images by default. If there is an image needed in a print document, a technique I've used is to insert it into the document with an img tag and hide it in the screen stylesheet but not the print stylesheet. A simple example would be a company logo: you can use a text-replacement method for the screen view, and display the img element in the print view for consistency.

You can't assume that 95% of your users will update their browser settings to enable printing background images, so this is really the only reliable way to accomplish printing images. 

I don't like the idea of offering a printable PDF because it sounds like it will take away the designers' control over the print view of a document (which would normally be controlled via the print stylesheet). Additionally, web to PDF formatting is less-than-exact; most pages I've seen that have taken screen HTML and reformatted to PDF HTML are, quite frankly, ugly.

If we are going to write a "print this page" macro, a better option, IMO, would be to open the same content in a new window with the print stylesheet active. This shows the user that the page will print out in a friendly format and does not require a browser plugin (however ubiquitous Adobe may be). 

Tessa Harmon

Knowmad Technologies



Back to Top
Rate [
|
]
 
 
rogier

But it may not be a good solution here, since you might want some of the background images to show up in print.

I don't see this as a huge concern, because most browsers are configured not to print CSS background images by default. If there is an image needed in a print document, a technique I've used is to insert it into the document with an img tag and hide it in the screen stylesheet but not the print stylesheet. A simple example would be a company logo: you can use a text-replacement method for the screen view, and display the img element in the print view for consistency.

You can't assume that 95% of your users will update their browser settings to enable printing background images, so this is really the only reliable way to accomplish printing images.

I don't like the idea of offering a printable PDF because it sounds like it will take away the designers' control over the print view of a document (which would normally be controlled via the print stylesheet). Additionally, web to PDF formatting is less-than-exact; most pages I've seen that have taken screen HTML and reformatted to PDF HTML are, quite frankly, ugly.

For that exact reason (designers having no control over the look of the PDF), I would say that a printable PDF option is not part of the templating project. If someone wants to build it, that's fine, but from the comments in this thread it doesn't seem that it's worth the effort.

If we are going to write a "print this page" macro, a better option, IMO, would be to open the same content in a new window with the print stylesheet active. This shows the user that the page will print out in a friendly format and does not require a browser plugin (however ubiquitous Adobe may be). 

We can do all those things with the tools we have now: the "make page printable" macro and the print style, right?

It occured to me that it may seem that I think using the CSS with * and !important is a better solution than a dedicated print stylesheet, but that is not the case. The advantage of the former method though, is that we don't lose the positioning.

What we could consider is adding the layout.css to the print style to keep the positioning, at least for page layouts.

Rogier | United Knowledge
www.unitedknowledge.nl · www.webgui-help.nl



Back to Top
Rate [
|
]
 
 
serif

What we could consider is adding the layout.css to the print style to keep the positioning, at least for page layouts.

Good suggestion. I will add that in when I revisit the Print Style.

 

Tessa Harmon

Knowmad Technologies



Back to Top
Rate [
|
]
 
 
     Goto page «Previous Page   1 2    Next Page»



© 2012 Plain Black Corporation | All Rights Reserved