phonegap フレームワークで作成されたアプリに印刷機能を導入する必要があります。javascriptからairprintを実装するか、ネイティブメソッドを使用するソリューションはありますか? ありがとう。
1315 次
2 に答える
0
Monotouch では、スクリーン ショットを撮ることができます。
public class ScreenShot
{
public static UIImage TakeScreenShot (UIView view)
{
RectangleF canvasRect = view.Bounds;
UIGraphics.BeginImageContext (canvasRect.Size);
CGContext ctx = UIGraphics.GetCurrentContext ();
ctx.FillRect (canvasRect);
view.Layer.RenderInContext (ctx);
UIImage newImage = UIGraphics.GetImageFromCurrentImageContext ();
UIGraphics.EndImageContext ();
return newImage;
}
}
于 2011-06-11T02:06:44.333 に答える
0
ここで提案されているコードを使用して phonegap のプラグインを作成します...
https://groups.google.com/forum/#!topic/phonegap/nAt0TqsStgc
それはあなたを指すでしょう
http://marceloprogramming.blogspot.com/2010/12/resolving-runtime-issues-with-airprint.html
于 2011-06-02T02:56:42.957 に答える