[rt-users] Printing

Stephen Dowdy sdowdy at ucar.edu
Thu Oct 13 11:40:25 EDT 2005

Mike Dent wrote:

> Nah, he most likely wants a simple print out of a ticket which can be
> given to field engineers with all the relevant information but without
> the colours, boxes etc, which seem
> to mess up the printing & formatting of tickets when I do it.
> Does anything exist currently?

He may want to make sure that he clicks on the "History" link before 
printing to remove the "People" "Links", etc elements from the display 
(which may not be needed for the field engineers and consume a good deal 
of paper-space)

The best "quick" fix for this that i could come up with in rt 3.4.x was 
setting up some print-media CSS in 'webrt.css'.  It's quite nasty, but 
does what i want.  It does leave some "[]" turds around for the HREFs for 
Respond, Comment, Show-Email links, since the brackets occur outside the 
link ref.  ( but saves a few picoliters of toner ;) )

RT 3.5+ is (as i understand it) supposed to make this a LOT easier and 
more aesthetically pleasing.

FWIW, i've also modified the code to make the BODY have an ID HTML element 
so that individual users can key off that ID tag using user-based 
style-sheets.  The file to do this in is html/Elements/Header like so:
     <BODY BGCOLOR="<%$BgColor%>" Id="RAL-RT"

For example using mozilla/firefox's user style sheet file
you could specify things like:

BODY#RAL-RT div.messagebody {
	font-family: wavygravyfont;

to keep from conflicting with other applications.

(TIP: i like to have the Transaction IDs appear in the History display, 
which can be done with this little piece of CSS
/* Display the RT Transaction Numbers */
BODY#RAL-RT a[name^="txn-"]:after {
     content: "[" attr(name) "]" !important;
     background-color: #6666AA;
     color: white;
     font-size: 7pt;
     font-family: "lucida-sans";

Anyway, here's the print media section in my 

(in mozilla you can verify these by doing "File->Print Preview" which 
should show the sidebar, some superfluous text, etc, being removed)

/* -- BEGIN: @media print ----------------------------------------------- */
@media print {
/* Override some stuff for printing in RT */

.topnav { display: none !important; }

/* Remove Tabs sidehead, some top heads, etc */
td.blue, td.blueright, table.darkblue {
         display: none !important;

/* Should remove the top table (logo, login, prefs) but doesn't */
body + table { display: none !important; }

/* Don't print the Download sideheads */
div.downloadattachment, div.downloadcontenttype {
         display: none !important;

.bpscredits, .page-stats {
         display: none !important;

/* attempt to compress message text in correspondence a bit */
div.messagebody {
         font-family: courier;
         font-size: 8pt;
         padding: 0em;
         line-height: 90%;

/* make correspondence headers stand out */
.message-header-key {
         font-weight: bold;
         font-size: 10pt;

.message-header-value {
         font-weight: italic;
         font-size: 10pt;

/* Remove links that makes no sense on paper */
a[href$="Respond"], a[href$="Comment"], a[href*="ShowEmailRecord"] {
         display: none !important;

/* -- END: @media print ------------------------------------------------- */

Stephen Dowdy  -  Systems Administrator  -  NCAR/RAP
303.497.2869  -  sdowdy at ucar.edu  -  http://www.rap.ucar.edu/~sdowdy/

More information about the rt-users mailing list