I am really new to iPhone dev.
I am evaluating whether to use Monotouch or objC for a potential app.
The app needs to be able to print pictures to a network printer.
I have seen couple of po开发者_JS百科sts about how to do it using cocoa touch/objc.
Could not find any examples of doing this using monotouch.
Is this doable/supported using MonoTouch?
This is a must have feature.
Thanks
This should do it, I have checked this into:
http://github.com/migueldeicaza/monotouch-samples in the "print" directory:
void Print ()
{
    var printInfo = UIPrintInfo.PrintInfo;
    printInfo.OutputType = UIPrintInfoOutputType.General;
    printInfo.JobName = "My first Print Job";
    var textFormatter = new UISimpleTextPrintFormatter ("Once upon a time...") {
        StartPage = 0,
        ContentInsets = new UIEdgeInsets (72, 72, 72, 72),
        MaximumContentWidth = 6 * 72,
    };
    var printer = UIPrintInteractionController.SharedPrintController;
    printer.PrintInfo = printInfo;
    printer.PrintFormatter = textFormatter;
    printer.ShowsPageRange = true;
    printer.Present (true, (handler, completed, err) => {
        if (!completed && err != null){
            Console.WriteLine ("error");
        }
    });
}
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论