Click here to Skip to main content
15,512,747 members
Home / Discussions / C#
   

C#

 
GeneralRe: Help Pin
Pete O'Hanlon15-Jul-14 22:44
mvaPete O'Hanlon15-Jul-14 22:44 
GeneralRe: Help Pin
gsn197018-Jul-14 1:42
gsn197018-Jul-14 1:42 
Generalneed your help Pin
gsn197025-Sep-14 5:12
gsn197025-Sep-14 5:12 
GeneralRe: need your help Pin
Pete O'Hanlon25-Sep-14 5:44
mvaPete O'Hanlon25-Sep-14 5:44 
GeneralRe: need your help Pin
gsn197025-Sep-14 21:53
gsn197025-Sep-14 21:53 
GeneralRe: need your help Pin
Pete O'Hanlon25-Sep-14 22:07
mvaPete O'Hanlon25-Sep-14 22:07 
GeneralRe: need your help Pin
gsn197025-Sep-14 22:14
gsn197025-Sep-14 22:14 
QuestionPrinting Bytes to printer in MVC Pin
nitin_ion8-Jul-14 0:32
nitin_ion8-Jul-14 0:32 
Below code works well for printing PDF when we have physical file.
But when we have bytes[] then it will not work. Is there a way we can print bytes[] to printer without showing the print dialog box.

C#
private static void PrintPDF(string FileToPrint)
        {
            PrinterSettings setting = new PrinterSettings();
            var printerName = setting.PrinterName;

            ProcessStartInfo info = new ProcessStartInfo(FileToPrint);
            info.Verb = "Print";
            info.CreateNoWindow = true;
            info.WindowStyle = ProcessWindowStyle.Hidden;
            Process.Start(info);
        }


There is a Microsoft Knowledge base article on this particular problem. Here in the article they send byte[] to the printer using Winspool API of Windows OS. but i don't feel it is optimized for web.

http://support.microsoft.com/kb/322091
AnswerRe: Printing Bytes to printer in MVC Pin
Kornfeld Eliyahu Peter8-Jul-14 0:58
professionalKornfeld Eliyahu Peter8-Jul-14 0:58 
GeneralRe: Printing Bytes to printer in MVC Pin
nitin_ion8-Jul-14 1:01
nitin_ion8-Jul-14 1:01 
AnswerRe: Printing Bytes to printer in MVC Pin
Kornfeld Eliyahu Peter8-Jul-14 1:05
professionalKornfeld Eliyahu Peter8-Jul-14 1:05 
GeneralRe: Printing Bytes to printer in MVC Pin
nitin_ion8-Jul-14 1:07
nitin_ion8-Jul-14 1:07 
AnswerRe: Printing Bytes to printer in MVC Pin
Kornfeld Eliyahu Peter8-Jul-14 1:14
professionalKornfeld Eliyahu Peter8-Jul-14 1:14 
GeneralRe: Printing Bytes to printer in MVC Pin
nitin_ion8-Jul-14 2:15
nitin_ion8-Jul-14 2:15 
AnswerRe: Printing Bytes to printer in MVC Pin
Kornfeld Eliyahu Peter8-Jul-14 2:20
professionalKornfeld Eliyahu Peter8-Jul-14 2:20 
AnswerRe: Printing Bytes to printer in MVC Pin
Richard MacCutchan8-Jul-14 2:14
mveRichard MacCutchan8-Jul-14 2:14 
GeneralRe: Printing Bytes to printer in MVC Pin
nitin_ion8-Jul-14 2:16
nitin_ion8-Jul-14 2:16 
GeneralRe: Printing Bytes to printer in MVC Pin
Pete O'Hanlon8-Jul-14 2:33
mvaPete O'Hanlon8-Jul-14 2:33 
AnswerRe: Printing Bytes to printer in MVC Pin
Dave Kreskowiak8-Jul-14 6:06
mveDave Kreskowiak8-Jul-14 6:06 
QuestionWindows services Not starting with c# codes Pin
Chinedu Nwankwo7-Jul-14 22:04
Chinedu Nwankwo7-Jul-14 22:04 
SuggestionRe: Windows services Not starting with c# codes Pin
Richard Deeming8-Jul-14 2:40
mveRichard Deeming8-Jul-14 2:40 
QuestionSession Timeout Pin
Member 106416987-Jul-14 20:57
Member 106416987-Jul-14 20:57 
AnswerRe: Session Timeout Pin
Bernhard Hiller7-Jul-14 21:46
Bernhard Hiller7-Jul-14 21:46 
AnswerRe: Session Timeout Pin
Karen Mitchelle7-Jul-14 21:55
professionalKaren Mitchelle7-Jul-14 21:55 
GeneralRe: Session Timeout Pin
Richard MacCutchan7-Jul-14 23:22
mveRichard MacCutchan7-Jul-14 23:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.