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

See Also: UIPrintInteractionController Members

Syntax

[Foundation.Register("UIPrintInteractionController", true)]
[ObjCRuntime.Availability(Introduced=ObjCRuntime.Platform.iOS_4_2)]
public class UIPrintInteractionController : Foundation.NSObject

Remarks

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

Requirements

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