Silverlight RichTextBox XAML and PDF support [closed]
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this questionI'm working on a silverlight project where we need a text-editor that meets the following requirements:
- Basic formatting (font-weight, font-size, alignment, etc.)
- Tables
- Making sections of text read-only
- Way to bind sections of the text to a datasource (two-way binding)
- Conversion to PDF
- Spellcheck
- A way to extend the editor as new features will be requested
- Support multiple instances of the editor
I've been looking at the RichTextBox that was added to silverlight 4 and I've been very impressed by its capabilities so far. Its seems very powerful and easy to build upon (like adding spellcheck). I was suprised to find that it didn't support RTF format though. So the biggest problem as I see it, is the PDF conversion. Unless there is a way to convert the XAML that the RichTextBox produces, to PDF, we have no choice to look for alternatives.
So my main question is: Is there a way to convert the RichTextBox XAML to PDF? Does not necessarily have to be a cut 'n paste solution, but preferably something that does not require reading 1000 pages of spec.
My second question is about the alternatives. We have been trying out a few third-party text-editors and those we tried has failed in one way or another. The VectorLight HTML editor has a tendency to produce inaccurate HTML. ComponentOne HTML editor removes开发者_如何学运维 tags, reformats the HTML and makes styling the HTML difficult if not impossible. The Telerik RichTextBox causes layout problems, overlap, flickering, etc. when having multiple instances of the editor. Is there any good alternatives out there?
Thanks
Are you sure you've tried the RadRichTextBox control? In the past Terelik had another similar control (RadEditor for Silverlight) but it's now obsolete. The RadRichTextBox is a native Silverlight control that has no layout and flickering problems. Also it has support for exporting in PDF trough PdfFormatProvider class. You can check here for more info on FormatPorviders model and how they are used.
Here you can see the RadRichTextBox(and also the PDF export) in action.
精彩评论