[pmwiki-users] Implementing download to MS Word

Powell, Terry N tpowe1 at uis.edu
Fri Oct 28 13:58:00 CDT 2005


I'm new to pmwiki, but I'd like to implement an action like 'print' that
will output the proper headers so the page gets downloaded to MS Word.  

I changed the print.php by adding:

$HTTPHeaders = array(
  "Expires: Tue, 01 Jan 2002 00:00:00 GMT",
  "Cache-Control: no-store, no-cache, must-revalidate",
  "Content-type: application/msword",
  "Content-Disposition: attachment; filename=$pagename.doc");

I also stripped down print.tmpl so I get a pretty clean looking Word
document.

However, I'd really like to implement this as add on functionality
rather than butchering the print action.

Can anyone give me some pointers on this (maybe sample code)?

Thanks.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20051028/511e18d1/attachment.html 


More information about the pmwiki-users mailing list