Thanks guys with everyone's help combined we were able
to getting going over here (on windows 2000) with two simple statements:
@sysargz = ("\"C:\\PROGRAM FILES\\ADOBE\\ACROBAT 4.0\\READER\\ACRORD32.EXE\" /t $filename \\\\$server\\$printer");
system(@sysargz);
Thanks again! :)
>From: michael higgins <[EMAIL PROTECTED]>
>To: Nick Hall <[EMAIL PROTECTED]>
>CC: [EMAIL PROTECTED], [EMAIL PROTECTED]
>Subject: Re: calling Adobe to print a PDF
>Date: Wed, 08 Jan 2003 13:33:55 -0500
>
>Nick Hall wrote:
>>Use the /t option on the Acrobat Reader
>>
>>http://support.adobe.com/devsup/devsup.nsf/docs/51412.htm
>>
>>tells you the details
>>
>>It works exceptionally well, despite being very poorly documented
>>
>>Nick
>
>Thanks, Nick.
>
>Some Win32::DDE that I was attempting, which now works, with the
>print command to a specific printer via system with, '/t' switch.
>
>use Win32::DDE::Client;
> # use Win32::Registry; (pr something) to ensure
> # you can launch...something acrobat ..??
>use strict;
>use warnings;
>
># you've found the path in the registry, so:
>my $filename = 'c:\\windows\\desktop\\out\\bio.pdf';
>
># open reader
>
> my @sysargz = ("start","\"C:\\Program Files\\Adobe\\Acrobat
>5.0\\Reader\\AcroRd32.exe\"");
> system(@sysargz);
>
>sleep(8); #whatever, or no server to talk to
>
>my $Client = new Win32::DDE::Client('acroview', 'control');
> print Win32::DDE::ErrorText ($Client->Error), "Unable to initiate
>conversation" if $Client->Error;
>
>$Client->TimeOut( 32767); #
>$Client->Execute
>("[DocOpen($filename)]");#c:\\windows\\desktop\\out\\bio.pdf
>
> print Win32::DDE::ErrorText ($Client->Error)," execute failed " &&
>die if $Client->Error;
>
># thought more quotes might help, but, not yet
># $Client->Execute
>("[FilePrintToEx(\"c:\\windows\\desktop\\out\\bio.pdf\", \"EPSON
>Stylus COLOR 1520\", \"EPSON Stylus COLOR 1520\", \"LPT1: (Printer
>Port)\"]");
># print Win32::DDE::ErrorText ($Client->Error)," execute failed " &&
>warn if $Client->Error;
>
>@sysargz = ("start",
>"C:\\PROGRA~1\\ADOBE\\ACROBA~1.0\\READER\\ACRORD32.EXE", "/t",
>"\"$filename\"", "\"EPSON Stylus COLOR 1520\"", "\"EPSON Stylus
>COLOR 1520\"", "\"LPT1: (Printer Port)\"");
>map{print$_,"\n\n"} @sysargz;
>system(@sysargz);
>
># simple version works for default printer
># $Client->Execute
>("[FilePrintSilentEx(c:\\windows\\desktop\\out\\bio.pdf)]");
># print Win32::DDE::ErrorText ($Client->Error)," execute failed " &&
>die if $Client->Error;
>
>sleep(6); # let the os print & return focus?
>
>$Client->Execute ("[DocClose($filename)]");
>print Win32::DDE::ErrorText ($Client->Error)," execute failed " &&
>die if $Client->Error;
>sleep(3); #still waiting around, I guess... there has to be a better
>way $Client->Execute ("[AppExit()]");
>print Win32::DDE::ErrorText ($Client->Error)," execute failed " &&
>die if $Client->Error;
>
>map{print $_.' is '. $$Client{$_}."\n"}keys(%$Client);
>
>
>__END__
>
>For the curious, I suppose. It may be the other commands putatively
>avalable to full-blown acrobat would be fun to play with... and
>there has to be a better way then estimating sleep values. But, I'm
>outta my league, big time.
>
>Bye!
>
>--
>Michael Higgins
>
>_______________________________________________
>ActivePerl mailing list
>[EMAIL PROTECTED]
>To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs