c# - Printing does not work after publishing to IIS -


i have pdf in location. when trying print in visual studio works. after publish iis doesn't print.

here code:

 bool usedefaultprinter = (request["usedefaultprinter"] == "checked");                 string printername = server.urldecode(request["printername"]);                 //create temp file name our pdf report...                 string filename = guid.newguid().tostring("n") + ".pdf";                 process printjob = new process();                 //printjob.startinfo.filename = @"../../../print/pos/print_without_preview/filename.pdf";//path of file;                   //printjob.startinfo.filename = @"c:\program files (x86)\adobe\reader 11.0\reader\acrord32.exe";                 printjob.startinfo.filename = server.mappath("../../../print/pos/print_without_preview/filename.pdf");//path of file;                   //printjob.startinfo.verb = "print";                 printjob.startinfo.verb = "printto";                 printjob.startinfo.arguments = "\"" + ddl_printer_list.selectedvalue + "\"";                 printjob.startinfo.createnowindow = true;                 printjob.startinfo.windowstyle = system.diagnostics.processwindowstyle.hidden;                 printersettings setting = new printersettings();                 setting.defaultpagesettings.landscape = true;                 printjob.start(); 


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -