0

Gone through the already existing posts on this topic, but my requirement is some what bit different.

Print jobs over the Network installed printers, upon a action in client side browser. Web server has got all printers in it, based on the client data, we need to print with client given configuration straight away, sending the job to printer(may be a different locations - but this is not a problem since the printers are in same network). I have seen printing architecture, Win32_print Class, SNMP, System.drawing.Printing, System.Printing.... but couldn't find the way to achieve this.. (Asp.net,C#)

-Files are been already existed in a server folder, just I need to pick up and send to a printer with client Selected Configuration...

update:I have to use JDF approach because all the files are PDF files. I am able to create JDF files with the selected configuration but sending this JDF to printer(JDF enabled) making me tough... There is JMF which post the JDF to printer, but not sure how to implement it.. still finding the ways, will be great if some one helps in this.

Thomas Fritsch
  • 9,639
  • 33
  • 37
  • 49
Jay
  • 1,869
  • 3
  • 25
  • 44
  • What kind of files are these? Are they final-form (PostScript, for instance), or do you need some kind of program to produce printable output before sending them to the printers? – John Saunders Nov 30 '12 at 04:26
  • Hi John, Thanks for looking into this issue. the files are PDF. Yes, I need to write a program to produce printable output copy and sending the same to the printer silently, possible I may need to show the progress of printing as well. – Jay Nov 30 '12 at 05:04
  • You should "ask" Adobe how to make a program launch Acrobat Reader to print a file. Then, adapt that technique to run in a Web application. Getting printing progress will be a different story; displaying progress to the user is yet another story. – John Saunders Nov 30 '12 at 05:06
  • @JohnSaunders I did implemented that using process with arguments by taking acrobat reader exe, I am able to print successfully, but the challenge not able to pass the print settings to it like(no.of copies,collation, duplex ..etc..)so in search for utility or an idea to create a print job with given print settings in web. – Jay Nov 30 '12 at 05:11
  • Again, this is a question for Adobe. There's no generic API for this, but there may be an Acrobat API. – John Saunders Nov 30 '12 at 05:12
  • @JohnSaunders I understand that Adobe doesn't have such API as of now, they may come in Future. but can you let me know is there a way that I can develop my own Spooler file and PCL file then send the job to Printer. – Jay Nov 30 '12 at 05:20
  • I don't see a way to do that. For each file to be printed, you would need to select the printer to use, set the printer preferences, then invoke Reader. But is the concept of "default printer" a per-process thing, or a per-session thing? It just doesn't really work the way you want it to. I suppose you could handle only a single job at a time; set the default printer; set the printer preferences; print the job; then start over. One file at a time. Very ugly. – John Saunders Nov 30 '12 at 05:24
  • Thanks for that, but pretty sure that I shouldn't follow that, I think i have to use JDF approach because all the files are PDF files. I am able to create JDF files with the selected configuration but sending this JDF to printer(JDF enabled) making me tough... There is JMF which post the JDF to printer, but not sure how to implement it.. still finding the ways, will be great if some one helps in this. – Jay Dec 04 '12 at 03:30
  • To send the JDF files we need to have RIP with hot folder, then the approach will work, but I am searching for a solution without any extra hotfolder software to each printer, rather to hotfolder straight to printer. – Jay Dec 11 '12 at 01:10

1 Answers1

2

Something I can answer! 8-) I'm actually working on a project that uses this, right now.

Do not use Acrobat Reader as any sort of server application. It has a User Interface that will pop up on a screen that doesn't exist, at an unexpected time and freeze your app, waiting for a click that will never happen.

Use Ghostscript. Ghostscript is free, Open Source and will work perfectly for what you want. Out-of-the-box it consists of a DLL and a command line inhterface, however there is an API and a ton of different interfaces including .Net, and versions for both Windows and Linux.

On a more "overview" type of note, the reason you can drag a PDF into a printer on your workstation is because Acrobat Reader contains the code and hooks to allow this. Windows doesn't actually contain native functionality to print PDFs.

Terry Carmen
  • 3,720
  • 1
  • 16
  • 32