I'm working with Pdftron PdfNet libraries for Xamarin.iOS and introducing the print function:
if (UIPrintInteractionController.PrintingAvailable)
{
var printerController = UIPrintInteractionController.SharedPrintController;
var printInfo = UIPrintInfo.PrintInfo;
printInfo.Duplex = UIPrintInfoDuplex.LongEdge;
printInfo.OutputType = UIPrintInfoOutputType.General;
printInfo.JobName = "Print";
printerController.PrintInfo = printInfo;
printerController.ShowsPageRange = true;
var formatter = this.mPdfViewCtrl.ViewPrintFormatter;
printerController.PrintFormatter = formatter;
printerController.Present(true, (handler, completed, err) =>
{
if (!completed && err != null)
{
Console.WriteLine("Printer Error");
}
});
}
Where mPdfViewCtrl is PDFViewCtrl type.
Now the problem is that the pages are printed all whites and no errors are triggered. I think that the problem is the PDFViewCtrl ViewPrinterFormatter that has not the right data. Has anyone had this promblem?