View Single Post

michelangelo's Avatar
Member Since: Apr 24, 2008
Location: West of Paris
Posts: 97
michelangelo is on a distinguished road
Mac Specs: MacBookPro, OS 10.9.4, iMac, OS 10.9.4, iPhone iOS 10.7.2, iPad iOS 10.7.2

michelangelo is offline
On the website, we want to have "screen view" for viewing and "print view" for printing.

In the past and when floated objects are located on the webpage, we prepare a pdf file for that.

When no floated objects appear on the page, we want to use instead as "print view" an html view of the same page (same.html file) to reduce work and footprint on the hosting server. In other words, the "print view" is a reliable screen view of what will be printed if we print the "print view" page using the printer

We access the print view via a link called 'print view" which opens a reduced size pop-up window with a degradable javascript

The way the site is programmed today, two stylesheets exist: a standard one for screen viewing called "styles.css" and a special one for print called styles_print.css"

The print view is accessed throug a copy of the original html file "original.html" called original_print.html" and containing a link modified to point to "styles_print.css"

This is cumbersome. Could I simplify this with javascript (or else) to use only one html file (the original.html)

Example page: see <>


-- Michelangelo
MacBookPro, OS 10.9.5, iMac, OS 10.9.5, iPhone iOS 8.3, iPad iOS 8.3, AirPort Time Capsule 802.11n (1st Generation), Airport extreme (early 2009)
QUOTE Thanks