print to network printer + GhostScript

R

Roel

Hello

I try to pint a pdf from a .net webapplication. Therefore I use GhostScript.

When I execute the following line via "start - run", the pdf is printed
correctly:
c:\gs\gs8.14\bin\gswin32c.exe -dNOPAUSE -dBATCH -sDEVICE=ljet4 -sOutputFile=
"%printer%\\SRV01\bezvntprt02\" c:\208.pdf

My code in the appication:

proc.StartInfo.FileName = "C:\\gs\\gs8.14\\bin\\gswin32.exe ";
proc.StartInfo.Arguments = "-dNOPAUSE " +
"-dBATCH " +
"-sDEVICE=ljet4 " +
"-sOutputFile=\"%printer%\\\\SRV01\\bezvntprt02\" " +
"c:\\208.pdf";
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.RedirectStandardOutput = true;
proc.Start();

But it won't work...
NOTE1: SRV01 = printserver
NOTE2 bezvntprt02 = printername

Does anybody knows what I'm doing wrong or has another solution ?

Regards
Roel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

print pdf via website 3
C# and Ghostscript 1

Top