[英]modifying a print preview
我正在構建一個ac#應用,該應用顯示(文檔的)打印預覽,然后要求用戶通過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;
沒有任何作用。
修改控件后使控件無效也無效。
我有點難過。
您是否嘗試使用InvalidatePreview方法而不是Invalidate?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.