Mara flatfile CMS

Printing of webpages

It is a well known -and highly aggravating- fact that many webpages will not print satisfactorily. There are several issues here. Perhaps the greatest is that the page may contain banners and menus which are not required on the printout, but which will nevertheless repeat themselves ad nauseam with every printed sheet.  The page may also use large areas of colour which either cannot be printed by the model of printer in use, or whose use in print would be too costly in ink or toner. Images may be too small to give satisfactory resolution in print. Finally, and perhaps most annoyingly, spurious page breaks in the middle of text or random blank sheets often result.

Stylesheets allow for a degree of printer-specific output formatting, using the @media command. Mara's system.css has the following section:

@media print {
  #cms_content {
    background:white; color:black;
  #cms_banner, #cms_top, #cms_left, #cms_right, #cms_bottom {

Whose aim is to reduce such problems. Note that it will only be effective if you've used the standard section IDs in your theme. You might in any case want to add an @media print section to your theme. Since its content will depend on your theme's styling, you would have to do a bit of experimenting to see what works best.

However, it has been observed that the @media print approach does not always overcome problems of spurious page breaks or blank sheets.

To better cater for printer output regardless of the theme in use, Mara cms provides its own print button, in the widgets section of the top menu toolbar. Instead of attempting to restyle the complete page for printing, this loads the content section only into a fresh browser tab, and offers to print it. We suggest that this print button is used in preference to the browser's print command.

Site maintainers should note that the menu-bar print button will not include unsaved changes when in editing mode. Also, the print button cannot be used in preview mode. This is because the printout is based on the disk version of the file. These issues do not in any way affect site visitors.

We could in principle expand on this feature by adding the choice of text-only printing or text with images, if that was thought to be useful.

Powered by Mara cms