I am new to Xamarin and i need to print to a brother rj-4250wb receipt printer.
I can get the printer to print but it prints the text i supply and then it line feeds a out a ton of blank pages...it seems like it does not have page settings.
This is the example code i am working with...i have spent a long time and have not been able to figure out how to pass the page size...can someone show me what i am missing please.
Thank you for your help.
I can get the printer to print but it prints the text i supply and then it line feeds a out a ton of blank pages...it seems like it does not have page settings.
This is the example code i am working with...i have spent a long time and have not been able to figure out how to pass the page size...can someone show me what i am missing please.
Thank you for your help.
C#:
public void Print(WebView viewToPrint)
{
var appleViewToPrint = Platform.CreateRenderer(viewToPrint).NativeView;
appleViewToPrint.MaximumContentSizeCategory = UIContentSizeCategory.Small;
var printInfo = UIPrintInfo.PrintInfo;
printInfoutputType = UIPrintInfoOutputType.General;
printInfo.JobName = "Testing Printing";
printInforientation = UIPrintInfoOrientation.Portrait;
printInfo.Duplex = UIPrintInfoDuplex.None;
var printController = UIPrintInteractionController.SharedPrintController;
printController.PrintInfo = printInfo;
printController.ShowsPageRange = true;
printController.PrintFormatter = appleViewToPrint.ViewPrintFormatter;
printController.Present(true, (printInteractionController, completed, error) => { }); }
}
Last edited by a moderator: