共用方式為


UIPrintInteractionController.PrintPageRenderer 屬性

定義

如果設定,請使用指定的 UIPrintPageRenderer 實例進行列印。

public virtual UIKit.UIPrintPageRenderer PrintPageRenderer { [Foundation.Export("printPageRenderer", ObjCRuntime.ArgumentSemantic.Strong)] get; [Foundation.Export("setPrintPageRenderer:", ObjCRuntime.ArgumentSemantic.Strong)] set; }
member this.PrintPageRenderer : UIKit.UIPrintPageRenderer with get, set

屬性值

屬性

備註

您必須實作 的 UIPrintPageRenderer 子類別,並將轉譯器的實例指派給 PrintPageRenderer 屬性。

// Get a reference to the singleton iOS printing concierge
UIPrintInteractionController printController = UIPrintInteractionController.SharedPrintController;

// Instruct the printing concierge to use our custom UIPrintPageRenderer subclass when printing this job
printController.PrintPageRenderer = new MyPrintPageRenderer (myData);

// Ask for a print job object and configure its settings to tailor the print request
UIPrintInfo info = UIPrintInfo.PrintInfo;

// B&W or color, normal quality output for mixed text, graphics, and images
info.OutputType = UIPrintInfoOutputType.General;

// Select the job named this in the printer queue to cancel our print request.
info.JobName = "Recipes";

// Instruct the printing concierge to use our custom print job settings.
printController.PrintInfo = info;

// Present the standard iOS Print Panel that allows you to pick the target Printer, number of pages, double-sided, etc.
printController.Present (true, PrintingCompleted);

適用於