For Programmers: Free Programming Magazines  


Home > Archive > PHP on Windows > April 2005 > Automatic word documents printing failure









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Automatic word documents printing failure
Nick

2005-04-21, 3:56 pm

hey,

i have generated some word files, based on an template with bookmarks, this
works.
Then i saved the files, and putted the path into an array. then i wanted to
print those files, but i always get this message. i am printing with a
network printer

"Wait till all document in process are completed"
or something like that mine is in dutch, "wacht tot alle in behandeling
afdruktaken zijn voltooid!"

my code

$printerlocation = "\\\\Glenn\\hp deskjet 990c";

content of array $afteprintenbestanden ==>> 2 files

c:\program files\apache group\Apache\htdocs\steon\klanten\Brutyn

Nick\briefVDAB.doc
c:\program files\apache group\Apache\htdocs\steon\klanten\Murat
Cetinkaya\briefVDAB.doc


$word->ActivePrinter = $printerlocation ;
for( $k = 1; $k < count($filestoprint); $k++)
{
$file= $filestoprint[$k];
$word->Documents->Open($file);
$word->ActiveDocument->PrintOut();
$word->Documents[1]->Close(false);
}
Nick

2005-04-21, 3:56 pm

on a network printer, he doesnt want to print

on a local printer, he only wants to print the last file


any help for this?
thanks
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com