修改打印预览
我正在构建 ac# 应用程序,它显示(文档的)打印预览,然后要求用户通过 InkPicture 控件“签署”文档。 我从 inkpicture 控件中提取位图并将其应用到 PrintDocument 没有任何问题(我在打印预览之前的过程中较早地执行此操作,并将这些图像绘制到打印文档中),但打印预览的目的是允许用户在打印文档时查看该文档并在其上签字。
我尝试将文档重置为修改后的文档,
// MyDocumentType derives from PrintDocument and ipSignature is a
// user control derived from InkPicture that converts the ink to
// a gif
MyDocumentType doc = (MyDocumentType)ppcPreview.Document;
doc.AddSignature(ipSignature.Gif);
ppcPreview.Document = doc;
我尝试重建打印预览控件,
MyDocumentType doc = (MyDocumentType)ppcPreview.Document;
doc.AddSignature(ipSignature.Gif);
ppcPreview = new PrintPreviewControl();
ppcPreview.Document = doc;
但没有效果。
修改后使控件无效也没有任何作用。
我有点难住了。
I'm building a c# app that displays a print preview (of a document) and then asks the user(s) to 'sign' the document via a InkPicture control. I've got no problems extracting the Bitmap from the inkpicture control and applying it to the PrintDocument (I do this earlier in the process before the print preview and paint those images to the printdocument) but the purpose of the print preview is to allow the user(s) to review the document as it would be printed and sign off on it.
I've tried resetting the document to a modified one
// MyDocumentType derives from PrintDocument and ipSignature is a
// user control derived from InkPicture that converts the ink to
// a gif
MyDocumentType doc = (MyDocumentType)ppcPreview.Document;
doc.AddSignature(ipSignature.Gif);
ppcPreview.Document = doc;
I've tried reconstructing the print preview control
MyDocumentType doc = (MyDocumentType)ppcPreview.Document;
doc.AddSignature(ipSignature.Gif);
ppcPreview = new PrintPreviewControl();
ppcPreview.Document = doc;
to no effect.
Invalidating the control after it's modified also does nothing.
I'm kind of stumped.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否尝试使用 InvalidatePreview 方法而不是 Invalidate ?
Did you try using the InvalidatePreview method instead of Invalidate?