【发布时间】:2011-05-24 10:13:17
【问题描述】:
我需要在我的应用程序中引入打印功能,这是使用 phonegap 框架制作的。有从javascript实现airprint或使用本机方法的解决方案吗?谢谢。
【问题讨论】:
标签: ios printing uiwebview cordova airprint
我需要在我的应用程序中引入打印功能,这是使用 phonegap 框架制作的。有从javascript实现airprint或使用本机方法的解决方案吗?谢谢。
【问题讨论】:
标签: ios printing uiwebview cordova airprint
【讨论】:
在 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;
}
}
【讨论】: