473,231 Members | 1,775 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,231 software developers and data experts.

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 1864
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: gb | last post by:
Hi All, Ive created a popup page using 'var openWindow = window.open("new","pop")' And added content using openWindow.document.write(" "); statements. But now I would like to be able to print...
0
by: Danny van Kasteel | last post by:
Hi all, I'm in need of a component that allows for printing a .pdf file, while assuming the identity of a windows account of choice. This is absolutely necessary, as the account is used to...
5
by: Mark Preston | last post by:
Admission first - I don't actually have a problem here but have noticed that a lot of people have been asking similar questions and getting very varied answers. What I've done is to sort of...
4
by: Jamey Shuemaker | last post by:
I've been looking for a way to do a duplex print job without a duplex printer. I reviewed some old posts about printing odd pages and found that most of them led to KB article 101075 or an export...
16
by: cyranoVR | last post by:
This is the approach I used to automate printing of Microsoft Access reports to PDF format i.e. unattended and without annoying "Save As..." dialogs, and - more importantly - without having to use...
0
by: Karthik | last post by:
Well I am coding an application using C# for my company which requires multiple printing of Crystal Report Docs & Word Docs, at a specific Printer of the installed Printers in the network, at a...
3
by: Mika M | last post by:
Hi all! I have made an application for printing simple barcode labels using PrintDocument object, and it's working fine. Barcode printer that I use is attached to the computer, and this...
7
by: Iain Wilson | last post by:
I am pulling my hair out trying to print various objects from a .net web page My apologies for cross posting but I need an answer and my previous post has attracted no interest. ASP.Net 2.0...
18
by: Brett | last post by:
I have an ASP.NET page that displays work orders in a GridView. In that GridView is a checkbox column. When the user clicks a "Print" button, I create a report, using the .NET Framework printing...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.