Forcing Print w/ Headers or Javascript?
From: Jason (jason_at_nospamplease.com)
Date: 09/28/04
- Next message: cool: "Re: Store form values in session"
- Previous message: Chris Heilman: "PHP Scripting Creation/Modification Help"
- Next in thread: Nikolai Chuvakhin: "Re: Forcing Print w/ Headers or Javascript?"
- Reply: Nikolai Chuvakhin: "Re: Forcing Print w/ Headers or Javascript?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 28 Sep 2004 04:09:48 GMT
I know this isn't a strictly PHP question, but I'm hoping somebody else
has addressed something similar.
I'm using php to build a document management system. I have a database
that references Microsoft Word documents (yep, gotta be M$ Word docs).
I can use the following PHP code to force a document to save on the
client's browser:
<?php
header("Content-type: application/ms-word");
header("Content-Disposition: attachment; filename=foo.doc" );
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0,pre-check=0");
header("Pragma: public");
readfile("/usr/files/foo.doc");
?>
I was wondering if somebody had a solution for making a php script that
would trigger a *print* of the .doc file (assuming the user has
Microsoft Word) while avoiding client-side COM scripting in Internet
Exploder (if possible).
- Next message: cool: "Re: Store form values in session"
- Previous message: Chris Heilman: "PHP Scripting Creation/Modification Help"
- Next in thread: Nikolai Chuvakhin: "Re: Forcing Print w/ Headers or Javascript?"
- Reply: Nikolai Chuvakhin: "Re: Forcing Print w/ Headers or Javascript?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|