note 49953 added to ref.com
| From: | pelegk2atwallaDOTcoDOTil at osu1 dot php dot net | Date: | Sun, 13 Feb 2005 16:49:43 +0000 |
| Subject: | note 49953 added to ref.com | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-84920@lists.php.net to get a copy of this message | ||
Printing to a network printer :
read this note for :
// 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
THEN
// 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 = 1;
//this is for example a printer on my network
$word->ActivePrinter = "\\\\192.168.4.201\\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);
its based on :
at last i did it with lot's of thanks too :
http://il.php.net/manual/en/ref.com.php
----
Manual Page -- http://www.php.net/manual/en/ref.com.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+49953
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+49953&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+49953&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+49953&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+49953&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+49953&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+49953&report=yes
Search -- http://master.php.net/manage/user-notes.php