ASP.NET MVC 4 application runs in Debian Squeeze Linux using Mono.
Controller creates html document like code below. html contains simple positioning divs and formatting instructions.
Linux server is running in internet provider and there are no desktop components installed. Additional components can installed if required. This is older, squeze x64 linux.
How to print this html file to Samsung printer connected to server ?
It there some executable which can used for this ? wkhtmltopdf and wkhtmltoimage do not have print options.
public class Test: Controller {
public ActionResult Print()
{
PrintOrderVormiga();
return new ContentResult() { Content = "OK" };
}
void PrintOrderVormiga()
{
sb = new StringBuilder();
sb.Insert(0, " <b>test</b> ", 500);
var doc = new PrintDocument();
doc.PrinterSettings.PrinterName = "Samsung ML-331x Series";
doc.PrintPage += new PrintPageEventHandler(ProvideContent);
doc.Print();
}
StringBuilder sb;
void ProvideContent(object sender, PrintPageEventArgs e)
{
?? how to print sb.ToString() as formatted html ?
}
}