I have an application made in C # MVC with a routine to print plain text on the default printer. The RawPrinterHelper.SendStringToPrinter
method that is described in this article has been used.
Printing normally occurs when I run the application locally, but when I publish to the server, it lists the printer installed on the server, not the client.
How do I get the application to get the printer from the client and not from the server? If it is not possible, how do I open the printer dialog box through the .Net C # MVC 4 application?
public bool ImprimeConteudoDiretamenteNaImpressoraPadrao(string conteudo)
{
string nomeImpressoraPadrao = (new PrinterSettings()).PrinterName;
return RawPrinterHelper.SendStringToPrinter(nomeImpressoraPadrao, conteudo);
}