PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
at last i did it wit lot's of thanks too : http://il.php.net/manual/en/ref.com.php
and look at : angelo [at] mandato <dot> com ->remarks!!!!
first yoou need :
// msword.inc.php
// NOTE: Using COM with windows NT/2000/XP with apache as a service
// - Run dcomcnfg.exe
// - Find word application and click properties
// - Click the Security tab
// - Use Custom Access Permissions
// - Add the user who runs the web server service
// - Use Custom Launch permissions
// - Add the user who runs the web server service
<?
// You must have word and adobe acrobat distiller on
// your system, although theoretically any printer driver
// that makes .PS files would work.
// starting word
$word = new COM("word.application") or die("Unable to instanciate Word");
print "Loaded Word, version {$word->Version}\n";
// bring it to front
$word->Visible = 0;
//this is for example a printer on my network
$word->ActivePrinter = "\\\\192.168.4.206\\printer1";
// Open a word document, or anything else that word
// can read
$input ="c:\\test.html";
$word->Documents->Open($input);
$word->ActiveDocument->PrintOut();
// closing word
$word->Documentsї1]->Close(false);
$word->Quit();
// free the object
$word->Release();
$word = null;
unset($word);
?>
Last edited by pelegk2 on Sun Feb 13, 2005 3:39 am, edited 1 time in total.
send's ts to a printer on the web
for example like an inforamtion station where you dont want to opne the user a printer dilaog box so you send it directly when he ask's to print!