Question

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.

Was it helpful?

Solution

Did you try using the InvalidatePreview method instead of Invalidate?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top