Home All Groups Group Topic Archive Search About

print an existing pdf file in vb.net 2005

Author
18 May 2006 9:33 AM
Federico Caselli
Hi,

I would just need to programmatically print a existing and known pdf file.
there must be some shellexecute stuff. Do you know how to write it?

I'm using vb.net, but in C# will be fine too...

Thank you very much.

Author
18 May 2006 12:12 PM
Eric Moreau
You need to use the Process component:

Dim MyProcess As New Process
MyProcess.StartInfo.FileName = "c:\temp\test.pdf"
MyProcess.StartInfo.Verb = "Print"
MyProcess.Start()


See an article I wrote in December 2003 at http://emoreau.s2i.com/

--


HTH

Éric Moreau, MCSD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Concept S2i inc. (www.s2i.com)
http://emoreau.s2i.com/

Show quote
"Federico Caselli" <FedericoCase***@discussions.microsoft.com> wrote in
message news:71DD4576-E057-45DB-A523-4B3827243411@microsoft.com...
> Hi,
>
> I would just need to programmatically print a existing and known pdf file.
> there must be some shellexecute stuff. Do you know how to write it?
>
> I'm using vb.net, but in C# will be fine too...
>
> Thank you very much.

AddThis Social Bookmark Button