Re: Generating word documents based on fields in a browser
| From: | Chris Earle | Date: | Wed, 10 Jul 2002 17:25:16 +0000 |
| Subject: | Re: Generating word documents based on fields in a browser | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-106885@lists.php.net to get a copy of this message | ||
Ya, I did it with ASP (customer requested) about 2 months ago...
"Chris Hewitt" <g0pae@manordat.demon.co.uk> wrote in message
news:3D2C5495.6060001@manordat.demon.co.uk...
> Craig,
>
> Its not PHP but HTML. I do this for a client. Make a Word document as
> needed, save it as rtf. Put a link onto my html page calling a
> particular routine. The routine reads the .rtf file, looking for
> replaceable parameters, replacing them with the customised values for
> this customer and saves the file under a new name indicating it is for
> this customer (still .rtf).
>
> A new page has a link to this new file. When the user clicks it, as
> their browser has the mime type for .rtf set to MS Word, Word starts up
> and opens the file.
>
> OK, in the application I did this in I used pl/sql (as the database was
> Oracle and there was no php) but there is no reason why you should not
> write a php routine to replace the parameters and resave the file.
>
> HTH
> Chris
>
> Craig wrote:
>
> >I know that php can open files.
> >What I was wondering is if it can :-
> >Start Word
> >Open a Word template
> >Generate fields in the template based on hidden fields and generate the
page
> >
>
>