Problems Background Printing PDF from C# Application


hello,

we having lot of problems trying print pdf file in background using c# application executed via sql server agent. output should printed local printer (hp color laserjet 1600) connected via usb port.

we have c# application calls system.diagnostics.process run acrobat reader (weve tried both v8.0.0 , v8.1.2), open existing pdf file, , send local printer. code shown below.

system.diagnostics.process process = new system.diagnostics.process();
process.refresh();
process.startinfo.arguments = "/t c:\temp\testpdf.pdf"; // , tried "/t c:\temp\testpdf.pdf printername"
process.startinfo.createnowindow = false;
//process.startinfo.domain;
//process.startinfo.errordialog = false;
process.startinfo.filename = "c:\\program files\\adobe\\reader 8.0\\reader\\acrord32.exe";
//process.startinfo.password;
//process.startinfo.username;
process.startinfo.useshellexecute = false;
//process.startinfo.verb = "print";
process.startinfo.windowstyle = system.diagnostics.processwindowstyle.hidden;
process.startinfo.workingdirectory = new system.io.fileinfo(m_pdfpathfile).directoryname;
process.start();

weve tried every combination of process objects properties trying pdf file print. but, never works. code executes without error, nothing ever shows on printer.

more info executing our custom c# application via sql server agent job. sql server agent running local system account. job step type operating system (cmdexec), run set sql server agent account. command path , file name of our custom c# application (e.g., c:\temp\printpdf.exe).

again, no errors/exception , no job failures, pdf never gets printed.

how can re-code or fix our situation?
what can done/tried?

all appreciated. stuck.
thanks.

the command line arguments unsupported documented in
the acrobat developer faq: don't match specification.
can expect problems trying use adobe reader impersonal
server process.

aandi inston


More discussions in Acrobat Reader


adobe

Comments

Popular posts from this blog

DHT11 Time out error using v0.4.1library

Sketch upload fails with Java error (___REMOVE___/bin/avrdude)!

Arduino Uno + KTY81/210 temperature sensor