Open espinielli opened 10 years ago
Wow. That PrintWhatYouLike service is an eye-opener. I'd been ignoring print thinking that mobile would replace it. (It still might.) But the service shows how much they can do without any help from federated wiki. Here is the full link to their page printing my page:
http://www.printwhatyoulike.com/print?url=http://code.fed.wiki.org/hyperperl.html
They fetch the server-side (no javascript) version of the page and print that. You can see these yourself by turning off javascript in your browser. I notice that Reference plugins don't render server-side. That shouldn't be hard and it is a core plugin.
Looks as if this is a stylesheet related problem.
A quick temporary hack is to drop into developer tools and edit the node <link href="/style.css" rel="stylesheet" type="text/css">
in the header to read <link href="/style.css" rel="stylesheet" type="text/css" media="screen">
This could also be applied to server/sinatra/views/layout.haml
, and the equivalent template file in the node version.
It would also be nice to have a print stylesheet to provide some better formatting when pages are printed.
Print stylesheed would be great! Bert Bos did cover print media in his book Cascading Style Sheets – designing for the Web, this article of his on how to print a book with CSS could be of inspiration too (even if in the end he relied on a commercial product to do so).
I suppose the proper thing to do would be to take all of the open page and flow them into two column print pages (three column in landscape). There is enough paragraph structure to avoid widowed lines. More graphic elements could float. Images might expand to full column width since print trades resolution for color depth.
I'm going to have to leave this to someone who knows beautiful printings.
We talked briefly about this during today's hangout.
I have a print stylesheet that will start each new page on a new piece of paper, also hiding some of the page elements (twins and journal), and the screen footer.
I think I will publish this, on in the node version, in the next few days. On the basis that that having something will foster some discussion, and should be useful.
The output is currently single column, but it should be possible to flow into multiple columns and vary this on paper size and orientation (using media queries).
Some other articles that are of interest:
I'll have a look at those and am eager to try something out and provide feedback: thanks! As another reference, the "Cascading Style Sheets" book has been written using CSS.
I have tried to print a fed wiki page on Chrome (Version 31.0.1650.63) and the preview fails, hence no way of printing. I resolved to PrintWhatYouLike to select the paragraphs and then print.
Printing works on Firefox (17.0.10).
Nothing in the Console to help...sorry.