470,810 Members | 1,147 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,810 developers. It's quick & easy.

Printing PDF on a specific printer without human action... How?

Hi,
I must print a PDF report from a windows service (so without human
action). The pdf is located in a specific place on hard drive that is
accessible to the application. Until now, I've only been able to open the
pdf file and the press on the "Print" button in acrobat. But that exactly
what I must avoid. The service must load the document and print it (well,
maybe not load it, but at least print it) all by itself. And the document
can be sent on different printers depending on the settings of the service
(actually, it can be sent to 3 printers), so I just can't send to the
default printer.

Is there a way to do it in .NET or will I have to buy some third party
component (which I would like to avoid too)

thanks

ThunderMusic
Feb 9 '06 #1
2 1765
ThunderMusic wrote:
Hi,
I must print a PDF report from a windows service (so without human
action). The pdf is located in a specific place on hard drive that is
accessible to the application. Until now, I've only been able to open the
pdf file and the press on the "Print" button in acrobat. But that exactly
what I must avoid. The service must load the document and print it (well,
maybe not load it, but at least print it) all by itself. And the document
can be sent on different printers depending on the settings of the service
(actually, it can be sent to 3 printers), so I just can't send to the
default printer.

Is there a way to do it in .NET or will I have to buy some third party
component (which I would like to avoid too)


You will have to buy a third party component. I'm using PDFNet, which is
IME excellent, though expensive. I don't know of any other way to print
PDFs (reliably!) from a service (or in my case, from an ASP.NET
application). If anyone else does, please speak up!

Cheers,
Rik
Feb 9 '06 #2
ok, I found the Acrobat ActiveX object, and I'm able to display the pdf and
even print it from code, but it always prints on the default printer. I
don't think there is a setting to change the printer it prints on beside
printing with dialog which is not what I want.

So, is it possible to change the default printer very quickly so I can print
the same document on 3 different printers? will I have to insert a delay
between the default printer changes?

Does someone have any sample code on how to change the default printer in
..net?

Thanks
"ThunderMusic" <NOdanlatSPAM@hotmaildotcom> wrote in message
news:Oc**************@TK2MSFTNGP12.phx.gbl...
Hi,
I must print a PDF report from a windows service (so without human
action). The pdf is located in a specific place on hard drive that is
accessible to the application. Until now, I've only been able to open the
pdf file and the press on the "Print" button in acrobat. But that exactly
what I must avoid. The service must load the document and print it (well,
maybe not load it, but at least print it) all by itself. And the document
can be sent on different printers depending on the settings of the service
(actually, it can be sent to 3 printers), so I just can't send to the
default printer.

Is there a way to do it in .NET or will I have to buy some third party
component (which I would like to avoid too)

thanks

ThunderMusic

Feb 9 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

16 posts views Thread by gb | last post: by
reply views Thread by Danny van Kasteel | last post: by
5 posts views Thread by Mark Preston | last post: by
reply views Thread by Karthik | last post: by
7 posts views Thread by Iain Wilson | last post: by
18 posts views Thread by Brett | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.