Tags:
create new tag
view all tags
I tried to create documentation with TWiki. The HTML presentation is ok, but when I printed it it look horrible. Can there be a way to produce some printing frendlier output?

sorry if it is to clese to TWikiForBookAuthoring

-- JanRuzicka - 11 Jul 2002

The best long term solution will be to use a dedicated CSS stylesheet for printing. So far as I know no one has tackled this yet though. I'm working on CSS-ifying TWiki but I won't get to printing for awhile yet. See http://www.alistapart.com/stories/goingtoprint/ for how it will work.

Update: it's actually really easy to implement. Edit view.print.tmpl and insert a stylesheet link just before the line which has " </head> " all by itself.

<link rel="stylesheet" type="text/css" media="all" href='%PUBURLPATH%/print.css'
<style type="text/css"> <!--
a[href^="/"]:after {content: " (http://%HTTP_HOST%/" attr(href) ") ";}
-->
</style>

Note: the 'media' type really should say "print" but just for this particular example we'll use all because we want to see, approximately, what it looks like in the browser. The HTTP_HOST variable will overwrite the hardcoded 'http://twiki.org/' in the external stylesheet.

Then cut and paste this stylesheet into a file called print.css and place it in your pub directory.

body {
   background: white;
   font-size: 12pt;
   width: auto;
   margin: 0 5%;
   padding: 0;
   color: black;
   }
a:link, a:visited {
   color: #520;
   background: transparent;
   font-weight: bold;
   text-decoration: underline;
   }
a:link:after, a:visited:after {
   content: " (" attr(href) ") ";
   font-size: 80%;}
a[href^="/"]:after {
   content: " (http://twiki.org/" attr(href) ") ";
   }

The hard part is designing the styelsheet that "looks good". The best visual editor I know of is TopStyle (http://www.bradsoft.com/topstyle/, Windows only I'm afraid.)

-- MattWilkie - 11 Jul 2002

Even with the best of styles, browsers are not good at printing large documents. Things like running headers + footers and a table of contents. For the old 20001201 release, I hacked sth to PrintUsingPDF. Got around to 20011201 only recently (think: ArgumentsAgainstTWikiOnIntranet). I hope to post a fix, erm, some day...
-- PeterKlausner - 11 Jul 2002

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2002-07-11 - PeterKlausner
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.