printing a pdf file from perl

2011-06-22 Thread Pilcrow
I am using strawberry perl 5.12.1.0 on top of Windows 7, sp1.
I have a perl program that produces a pdf file, using PDF::Create,  I
want to be able, using the same program, to print that file.  I know
that I can launch Adobe Reader to view the file, using , and then
to print it, from Adobe's window.

I want to print the file from my perl program without launching Adobe
Reader.

I note that the file can be printed from within windows explorer by
right clicking on the file and choosing print.  How can I do the same
thing from within perl?

I would like to be able to print any file that I can print from the
windows explorer window.

I realize that this may not be the most appropriate forum, but I don't
know a better one, so please don't be rough with me.  And thanks in
advance.



Re: printing a pdf file from perl

2011-06-22 Thread Pilcrow
On Jun 22, 6:18 am, d...@perl.it (Aldo Calpini) wrote:
> On 22.06.2011 05:11, Pilcrow wrote:
>
> > I want to print the file from my perl program without launching Adobe
> > Reader.
>
> this PerlMonks post could be of help:
>
> http://www.perlmonks.org/?node_id=824842
>
> basically, 3 different approaches are mentioned there:
>
> 1. use Win32::OLE
> 2. use system() to invoke Reader (hint: add the /p parameter)
> 3. use Win32::API and ShellExecute (that's basically the same thing as
> right clicking on the file from the explorer)
>
> note that in all 3 cases Adobe Reader *is* launched, just not visible.
> which also means it must be installed on the machine that has to print
> the PDF, otherwise it won't work.
>
> hope this helps!
>
> cheers,
> Aldo

After all my threshing around, you gave me the solution  -- actually 3
solutions..  Thanks loads!