Ace128 has asked for the wisdom of the Perl Monks concerning the following question:
This seems to be working the best, since EVERY file is added to the printqueue. However, can someone confirm the data printed is ok? It doesnt say amount of pages in the printqueue as it does with other ways mentioned below. Something about a "raw" print... Dont wanna have rubish on paper...use Win32::Printer::Direct; sub printFile { my $filename = shift; my $val = Printfile("HP DeskJet 870Cxi", $filename); return ($val == 1); }
This one doesnt seem to print every file. And if I add a sleep inside the if, only one is added to the printqueue, and then nothing seems to be happening. Doesnt even seem exit the sub. Wierdo.use Win32::API; my $shellopen = new Win32::API("shell32", "ShellExecute", ['N', 'P', 'P', 'P', 'P', 'I'], 'N'); sub printFile { my $filename = shift; if ($shellopen) { $shellopen->Call(0, "print", $filename, 0, 0, 0); print "Printing $filename...\n"; } }
Well, this one kinda works, but next is not taken until I close the application.my $exec = '"K:\\Program\\Adobe\\Acrobat 7.0\\Acrobat\\Acrobat.exe" /t + "a_pdf_file.pdf" "HP DeskJet 870Cxi"'; system($exec); system($exec); system($exec);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Printing MANY .pdf files in Windows
by xdg (Monsignor) on Mar 24, 2006 at 16:28 UTC | |
|
Re: Printing MANY .pdf files in Windows
by radiantmatrix (Parson) on Mar 24, 2006 at 16:41 UTC | |
by Ace128 (Hermit) on Mar 25, 2006 at 10:26 UTC | |
by radiantmatrix (Parson) on Mar 25, 2006 at 16:41 UTC |