[webkit-dev] a question on printing: whither WSIWYG?

Mike Fischer mf_software at mac.com
Fri Oct 6 19:11:42 PDT 2006

Am 03.10.2006 um 11:49 schrieb peliom at tikirobot.net:

> Here is the original website  page:
> http://www.michaelang.com/a/92/fall-classes-at-the-lemurplex.html
> When printed using Safari 2.0.4, this is the resulting PDF.  It it  
> looks like the stylesheet is missing or something.
> http://tikirobot.net/t/1DFE8229/SafariSaveAsPDF.pdf
> Here are the webarchive and pdf files created by my application.   
> As with Safari, the web page looks great but the PDF page looks  
> terrible.

Well basically you are right. The stylesheet is missing when  
printing. But this seems to be a design choice. If you look at line 7  
of the page source you will see the line:

	<style type="text/css" media="screen">

The media attribute is set so that the stylesheet is only applied  
when the page is viewed on a screen. When printing it is not used.

> http://tikirobot.net/t/1DFE8229/1DFE8229.webarchive
> http://tikirobot.net/t/1DFE8229/1DFE8229.pdf
> Anybody know what is going on?

Well either the page is missing a stylesheet for media="print" or the  
given stylesheet should not be limited to media="screen". Unless of  
course the author wanted it this way on purpose. Using custom  
stylesheets for printing can very effectively enhance readability and  
printability of printed web pages.

BTW. This question has nothing to do with the development of webkit.  
It would be better placed on web-dev-request at lists.apple.com or some  
other HTML/CSS forum.

Mike Fischer         Softwareentwicklung, EDV-Beratung
                                     Schulung, Vertrieb
Web: <http://homepage.mac.com/mike_fischer/index.html>

More information about the webkit-dev mailing list