HighDots Forums  

Flexible Printing

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Flexible Printing in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Rhino
 
Posts: n/a

Default Flexible Printing - 01-05-2009 , 11:02 PM






Let's say that I want to make printing the web pages at my customer's site
as flexible as possible. Rather than forcing them to print a page that is a
mirror image (or as close as possible) of the page, I'd like to give them
the option of printing the index, the header, the art work that just
pretties up the page, and the background or omit it as they see fit. What
are the best ways to accomplish this?

I can well imagine using Javascript for that purpose but it seems a bit
dated as approaches go. What better methods exist for accomplishing this
goal? Can anyone point me to tutorials for these methods?

--
Rhino
---
"There are two ways of constructing a software design. One way is to make it
so simple that there are obviously no deficiencies. And the other way is to
make it so complicated that there are no obvious deficiencies." - C.A.R.
Hoare



Reply With Quote
  #2  
Old   
Bergamot
 
Posts: n/a

Default Re: Flexible Printing - 01-05-2009 , 11:45 PM







Rhino wrote:
Quote:
Rather than forcing them to print a page that is a
mirror image (or as close as possible) of the page,
FYI, you can't force anything.

Quote:
I'd like to give them
the option of printing the index, the header, the art work that just
pretties up the page, and the background or omit it as they see fit.
Printing backgrounds are already under the user's control - it's a
browser setting. You cannot make backgrounds print if the user has them
disabled. You can, however, hide/omit them with a print stylesheet.

Quote:
What
are the best ways to accomplish this?
Not sure why you want to go to the trouble of making those other
elements selectable by the user in the first place. My usual method is
to use CSS @media rules - some specific to screen media that include
backgrounds and such, and some for print that hide the site navigation
and other unnecessary things. Don't waste the user's expensive printer ink.

--
Berg


Reply With Quote
  #3  
Old   
Jeff
 
Posts: n/a

Default Re: Flexible Printing - 01-06-2009 , 12:26 AM



Rhino wrote:
Quote:
Let's say that I want to make printing the web pages at my customer's site
as flexible as possible. Rather than forcing them to print a page that is a
mirror image (or as close as possible) of the page, I'd like to give them
the option of printing the index, the header, the art work that just
pretties up the page, and the background or omit it as they see fit. What
are the best ways to accomplish this?
I suppose you could set up alternate stylesheets:

http://www.alistapart.com/articles/alternate/

look up @media print for defining print only styles

I know nothing about this other than it is possible.

Jeff
Quote:
I can well imagine using Javascript for that purpose but it seems a bit
dated as approaches go. What better methods exist for accomplishing this
goal? Can anyone point me to tutorials for these methods?


Reply With Quote
  #4  
Old   
Jeff
 
Posts: n/a

Default Re: Flexible Printing - 01-08-2009 , 12:05 PM



Rhino wrote:
Quote:
"Bergamot" <bergamot (AT) visi (DOT) com> wrote in message
news:6sg5vrF5ruipU1 (AT) mid (DOT) individual.net...
Rhino wrote:
Rather than forcing them to print a page that is a mirror image (or as
close as possible) of the page,
FYI, you can't force anything.

No, of course not. Forgive my poor choice of words. What I meant to say was,
that if I do nothing about setting up a specific print stylesheet, they will
print everything on the page, less the backgrounds if they have that turned
off in the browser. And that, as we know, is a waste of their ink.

I'd like to give them the option of printing the index, the header, the
art work that just pretties up the page, and the background or omit it as
they see fit.
Printing backgrounds are already under the user's control - it's a browser
setting. You cannot make backgrounds print if the user has them disabled.
You can, however, hide/omit them with a print stylesheet.

Yes, you're right about the background. I forgot about that setting in the
browser.

What are the best ways to accomplish this?
Not sure why you want to go to the trouble of making those other elements
selectable by the user in the first place. My usual method is to use CSS
@media rules - some specific to screen media that include backgrounds and
such, and some for print that hide the site navigation and other
unnecessary things. Don't waste the user's expensive printer ink.

Actually, it's not really my idea. My customer would like to be able to give
the user control over this. I suggested that when her customers chose to
print a specific page, we printed simply the information that was unique to
that page, i.e. the main body of the page, less any site navigation and
non-essential graphics (art that merely adorns the page rather than
essential stuff like a map how to get to her place of business). But she
apparently thinks the site visitors might want the choice of printing the
adorning art so she wants to know if we can give them that option. I think
it's a reasonable request so I'm trying to figure out the best way to do it.

In fact, I thought I'd go one better. I'd like to be able to have a dialog
that comes up when someone clicks a print button and that dialog should give
the user three radio buttons:
o Print everything
o Print only the information unique to this page
o Print only the following portions of the page

Since the page is presumably a server database page, why not just
have that form load a new page with just the styling you need. You could
then either

A) assemble a stylesheet using assorted display none and or @media print

B) just assemble the parts of html you need

C) server a predefined stylesheet.

Quote:
The last option would be followed by checkboxes that would say:
- header/logo
- site navigation
- adorning art
Presumably you can or already have these bits identified with either
classes or ID's. Bergamot is correct in that the user would have to turn
on background image/color printing if it was in the usual default off
position. They may also have to turn images which usually is on by
default. You may wish to go for altering/assembling the stylesheet
rather than having 3 * 3 = 9 alternate stylesheets!

Due to the special nature of this, I would have no problem using
javascript to turn these on/off on the fly. It's far more interactive as
the page does not have to reload if you should wish to give them visual
clues as to what they *may* (with the caveats of browser printing rules)
be printing. There's several ways of doing that, including just
overwriting your rules.

I get a fair number of requests (lately) for special printing
instructions, this only involves positioning of page breaks though. My
most current one involves printing packing slips, people are treating
their websites like Desktop Applications and I suspect you will see far
more of it.

Jeff
Quote:
Of course the wording of the options would be a little different but that is
the gist.

What is my best way of accomplishing that? I'm really not that keen on
Javascript but will certainly consider it if there is no better way.....

--
Rhino



Reply With Quote
  #5  
Old   
dorayme
 
Posts: n/a

Default Re: Flexible Printing - 01-08-2009 , 04:41 PM



In article <gk52nc$er0$1 (AT) news (DOT) datemas.de>,
"Rhino" <no.offline.contact.please (AT) example (DOT) com> wrote:

Quote:
"Bergamot" <bergamot (AT) visi (DOT) com> wrote in message
news:6sg5vrF5ruipU1 (AT) mid (DOT) individual.net...

Rhino wrote:

Rather than forcing them to print a page that is a mirror image (or as
close as possible) of the page,

FYI, you can't force anything.

No, of course not.
O for Christ's sake! Of course, you can force a lot of things onto a lot
of people in the real world as distinguished from the Disney HTML world
where every second person has his or her own stylesheet sprinkled with
geeky important!'s and/or weirdo browsers that go their own mule like
ways.

(No... it's too early for a stiff scotch. I will be disciplined and wait
for another 10 hours. I will force myself. But, I better get that blood
pressure monitor out just in case. <g>>)

--
dorayme


Reply With Quote
  #6  
Old   
Peter Kumaschow
 
Posts: n/a

Default Re: Flexible Printing - 01-13-2009 , 03:19 AM



Rhino wrote:
Quote:
Let's say that I want to make printing the web pages at my customer's site
as flexible as possible. Rather than forcing them to print a page that is a
mirror image (or as close as possible) of the page, I'd like to give them
the option of printing the index, the header, the art work that just
pretties up the page, and the background or omit it as they see fit. What
are the best ways to accomplish this?

I can well imagine using Javascript for that purpose but it seems a bit
dated as approaches go. What better methods exist for accomplishing this
goal? Can anyone point me to tutorials for these methods?

You could use a form and javascript (DHTML) to alter the style sheet
properties of the various page elements that you want to hide or make
visible.


Reply With Quote
Reply




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



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.