This question is locked. New answers and comments are not allowed.
At first it can print fine. But after several attempts (didn't count but at least 10) it will begin to throw an error message "Eval failed" when calling the editor.Print line. Once it starts to fail the app cannot print anymore and has to restart IE.
at System.Windows.Browser.HtmlWindow.Eval(String code)
at Telerik.Windows.Documents.UI.HtmlPrinter.Print(RadDocument document, PrintSettings settings, Boolean preview)
at Telerik.Windows.Controls.RadRichTextBox.Print(PrintSettings printSettings)
at Telerik.Windows.Controls.RadRichTextBox.Print(String documentName, PrintMode mode)
at Kinark.KIDS4.SL.DocEditor.rtbEditor_CommandExecuting(Object sender, CommandExecutingEventArgs e)
at Telerik.Windows.Controls.RadRichTextBox.OnCommandExecuting(CommandExecutingEventArgs e)
at Telerik.Windows.Documents.RichTextBoxCommands.RichTextBoxCommandBase.Execute(Object parameter, Boolean focusCaret)
at System.Windows.Browser.HtmlWindow.Eval(String code)
at Telerik.Windows.Documents.UI.HtmlPrinter.Print(RadDocument document, PrintSettings settings, Boolean preview)
at Telerik.Windows.Controls.RadRichTextBox.Print(PrintSettings printSettings)
at Telerik.Windows.Controls.RadRichTextBox.Print(String documentName, PrintMode mode)
at Kinark.KIDS4.SL.DocEditor.rtbEditor_CommandExecuting(Object sender, CommandExecutingEventArgs e)
at Telerik.Windows.Controls.RadRichTextBox.OnCommandExecuting(CommandExecutingEventArgs e)
at Telerik.Windows.Documents.RichTextBoxCommands.RichTextBoxCommandBase.Execute(Object parameter, Boolean focusCaret)
private void rtbEditor_CommandExecuting(object sender, Telerik.Windows.Documents.RichTextBoxCommands.CommandExecutingEventArgs e)
{
if (e.Command is PrintCommand)
{
if (e.CommandParameter != null && e.CommandParameter.ToString() == "Html")
{
rtbEditor.Print(Title, Telerik.Windows.Documents.UI.PrintMode.Html);
e.Cancel = true;
}
if (e.CommandParameter != null && e.CommandParameter.ToString() == "HtmlPreview")
{
rtbEditor.Print(Title, Telerik.Windows.Documents.UI.PrintMode.HtmlPreview);
e.Cancel = true;
}
}
}