c# - Printing multiple files using process.start -


here have code opens adobe , causes print pdf file using process.start(). trying print multiple files (two different pdfs) using same command. how go this? have far:

 process profileprintprocess = new process();                 profileprintprocess.enableraisingevents = true;                 profileprintprocess.startinfo = new processstartinfo()                 {                     createnowindow = true,                     verb = "printto",                     filename = "[" + proffilename + " " + contractfilename + "]",                     windowstyle = processwindowstyle.hidden,                 };                  profileprintprocess.start(); 

i've been using link guide per question referenced similar issue.

to print single file trough acrobat reader try , let me know if worked:

system.diagnostics.process process = new system.diagnostics.process(); system.diagnostics.processstartinfo startinfo = new system.diagnostics.processstartinfo(); startinfo.windowstyle = system.diagnostics.processwindowstyle.hidden; startinfo.filename = "acrord32.exe"; startinfo.arguments = "/p " + yourpdffilepath; process.startinfo = startinfo; process.start(); 

to printig multipile pdf files first combine them , next print combined document trough pdfsharp

var outputpdfdocument = pdfdocument.combine("output.pdf", "doc1.pdf", "doc2.pdf", "doc3.pdf"); outputpdfdocument.save("c:\\temp.pdf");   pdffileprinter.adobereaderpath = @"c:\program files\adobe\reader 8.0\reader\acrord32.exe";   pdffileprinter.defaultprintername = "take printer";    pdffileprinter printer = new pdffileprinter(@"c:\\temp.pdf");   printer.print();   

Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -