Digital Signature Pls help

DeveloperTeam

I tried to user your product and I have a problem.
I tried the following code to DigitalSign document and it says:
An unhandled exception of type 'System.NotSupportedException' occurred in mscorlib.dll

Additional information: Stream does not support reading.
Please help me what is problem?
Thank you
X509Certificate2 certificate = new X509Certificate2("JohnDoe.pfx", "johndoe");
// The name of the signature must be unique.
string signatureName = "SampleSignature";

// This is the Form XObject element that represents the contents of the signature field.
Telerik.Windows.Documents.Fixed.Model.Objects.Form form = new Telerik.Windows.Documents.Fixed.Model.Objects.Form();
form.FormSource = new FormSource();
form.FormSource.Size = new System.Windows.Size(120, 120);

// We will use the editor to fill the Form XObject.
FixedContentEditor formEditor = new FixedContentEditor(form.FormSource);
formEditor.DrawCircle(new System.Windows.Point(50, 50), 20);
formEditor.DrawText(signatureName);

// The Signature object is added to a signature field, so we can add a visualization to it.
SignatureField signatureField = new SignatureField(signatureName);
signatureField.Signature = new Signature(certificate);

Martin

I answered in another ticket that you open about this unexpected behavior but will paste the answer here to share the information with the community.

After reviewing the presented code snippet, it seems that our code snippet is not correct and the exception was caused because read-only FileStream object is passed to the FileStream.Write method. We will do our best to fix the documentation article as soon as possible. Please take a look at this article in Microsoft documentation for reference. You can replace the Write method with Open and use FileMode.OpenOrCreate as a parameter of the method. Please take a look of the code snippet below for example:

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.