UIKit.UIPrintInteractionController Class
Main driver for the printing process on iOS.

See Also: UIPrintInteractionController Members


[Foundation.Register("UIPrintInteractionController", true)]
public class UIPrintInteractionController : Foundation.NSObject


The UIPrintInteractionController provides access to the printing framework on iOS. To print on iOS, you configure the UIPrintInteractionController.SharedPrintController singleton by specifying your print task, optionally hook up to events and then you invoke the UIPrintInteractionController.Present(bool, UIPrintINteractionCompletionHandler) method to allow the user to select a printer and to print.

This class offers a number of mechanisms for printing, you can print using one of these configuration, based on your needs

C# Example

	// Print a PDF file, simple API
        NSUrl url = NSUrl.FromFilename ("SomeFile.pdf");           
	var printInfo = UIPrintInfo.PrintInfo;

        printInfo.OutputType = UIPrintInfoOutputType.General;
        printInfo.JobName = "Test: PDF Print";

        var printer = UIPrintInteractionController.SharedPrintController;

        printer.PrintInfo = printInfo;
        printer.PrintingItem = url;
        printer.ShowsPageRange = true;

        printer.Present (true, (handler, completed, err) => {
            if (!completed & err != null){
                Console.WriteLine ("error");

Related content


Namespace: UIKit
Assembly: Xamarin.iOS (in Xamarin.iOS.dll)
Assembly Versions: