By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,995 Members | 1,268 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,995 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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.