Pdfnet xamarin.ios doesn't print

65 Views Asked by At

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?

1

There are 1 best solutions below

2
Ryan On

This will be in the next release of PDFTron for Xamarin.iOS. Are you evaluating PDFTron, or working on a new release?