Created by: gwideman, Nov 1, 2010 9:14 pm
Revised by: gwideman, Jan 10, 2012 3:19 am (6 revisions)

Because addons take you in the direction of more elaborate pages, it is important to bear in mind whether users can successfully print such pages. This calls for a look at the various ways to print a Wikispaces page, and an assessment of which methods to support.

Methods for printing a wikispaces page

Here are all the methods that a user might use to try to print a page:

  • Wikispaces tabs: Page > Print
  • Wikispaces tabs: Page > Download PDF
  • Browser Print
    • Also Page Setup and Print Preview

These methods each have their pros and cons.

Wikispaces Page > Print

Since this appears in the official Wikispaces menus, one would think that this is the method likely to produce the best result. Unfortunately, the page that Wikispaces produces from the Page . Print command can only partly succeed:
  • The page does eliminate the peripheral areas such as header area and navigation sidebar
    • Of course, you might prefer that the header area be included in the printed page.
  • The page does load and apply the user's content CSS.
  • The page is not based on the site's theme, hence does not include any custom javascript that you may have included there.
  • If the page's content includes an HTML widget, that is included in the Print page; if the widget encompasses Javascript then that too will be delivered and executed.

In short, the Page > Print view of a page can be made to behave well so long as any customizations to appearance are based on CSS, and not on Javascript. If Javascript is used in an addon that enhances pages, then those enhancements will not appear in the Page > Print version (unless included in an HTML widget in the page content, not normally the case.)

Wikispaces Page > Download PDF

At the current time (fall 2010), this function is not very usable.
  • Does not supply a title
  • Does not apply user CSS markup
  • Images appear very small (does not take into account DPI properly)
  • Tables are badly formatted

In short, in my view it's not worth bothering with this function.

Browser Print function

This is the method that most users will be familiar with already.

However, by default, browser print it has a couple of issues:

  • Does not eliminate the peripheral area
  • Manages to stumble on bugs in Firefox 2.x and 3.x which cause only one page of content to print.

However, all is not lost! Turns out that both these issues can be dealt with.

  • We can control what gets shown in print view using CSS's "media" type feature. For media = print we can hide the sidebar, menus and so on.
  • The Firefox bug concerns divs with attribute "overflow" set to "auto". We can change that as one of the CSS rules for media = print.

On the positive side, the browser's print function does not reload the page (and the DOM), instead it just rerenders the existing DOM, paying attention to Page Setup settings, and using media=print to activate any custom CSS we have set up for that medium. Consequently, any enhancements that addons may have performed via Javascript will be present in the printed version.

Conclusions

My position is that neither of the wikispaces print-related features (Page > Print and Page > Download PDF) offer any useful functionality beyond what can be accomplished with print-specific CSS. Consequently, once you have implemented such CSS, it would make sense to delete these options from the Page menu using Javascript.