Forum Moderators: open

Message Too Old, No Replies

Printing an alternate document in Firefox

works in IE not in firefox

         

kodt

2:56 pm on Jun 10, 2008 (gmt 0)

10+ Year Member



Here is what I am trying to achieve, when a user prints the web-page it will print a separate word document instead of the html page. The word document contains completely different content than the html page so using an alternate stylesheet for printing will not work.

Here is the code I am using:

<link rel="alternate" media="print" type="application/msword" href="docs/WordDoc.doc">

I have this code between the <head></head> tags.

This works fine in IE but does not work in FireFox. I have not tested Safari or Opera yet. Is it possible to get this working?

penders

4:26 pm on Jun 10, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



This may be a Microsoft (Word/IE) only feature? Only IE includes the mime-type 'application/msword' in the HTTP request accept header. Perhaps you need to check for this and deliver alternative content?

Also, what if they don't have Word installed? (I guess IE will not include this mime-type if the user does not at least have a word-viewer installed?)