What is the best way to display formatted word docks in HTML / PHP?
Here
$ word = new COM ("word.application") or die ("MS Word object could not be started."); $ Word- & gt; Documents-> Open (realpath ("ACME.doc")); // Remove content $ content = (string) $ word- & gt; Active document - & gt; material; Counterpart $ content; $ Word- & gt; ActiveDocument-> Off (wrong); $ Word- & gt; Leave (); $ Word = null; Not set ($ word); I do not know anything about com, but MSDN is poking around the Word API docs, it seems that your best bet is being used to save as a temporary file, then the user will be using that HTML Is serving. Be sure to choose filtered HTML, otherwise you are going to receive the most soup tag ever.
Comments
Post a Comment