I just saw that aspose has a demo SL app up
You can upload some RTF files there and check if the control does the job...

http://www.aspose.com/demos/.net-components/aspose.words/silverlight/demo.aspx#/Demo

My tests with some RTF's looked promising

<http://www.aspose.com/demos/.net-components/aspose.words/silverlight/demo.aspx#/Demo>
.peter.gfader.
http://blog.gfader.com/
http://twitter.com/peitor

On Sat, May 15, 2010 at 1:27 PM, Chris Anderson <[email protected]>wrote:

> Hi Steven
>
> I wrote an article (for Silverlight 2, but still valid), which covers
> creating an IFrame and displaying HTML/PDF/Word/etc inside it using their
> browser plugins:
> www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-6.aspx.
>  To me, it does look as though it's a part of the application (assuming the
> user has the corresponding plugin installed).  It resizes with the browser
> window, and you get all the functionality of that plugin (particularly
> printing).  Alternatively, check out the Document Toolkit from First Floor
> Software (by Koen Zwikstra, of Silverlight Spy fame):
> http://firstfloorsoftware.com/documenttoolkit.  It displays XPS, and he
> discussed displaying PDF using it too (not sure on the status of that
> though).  Check out my example anyway too, and see what you think.  I also
> discuss this topic (primarily in regards to reporting) in my upcoming book
> Pro Business Applications with Silverlight 4 (for Apress).
>
> In terms of displaying RTF, you might want to look at some open source RTF
> parsers in C# like:
>
> http://www.codeproject.com/KB/string/nrtftree.aspx
> http://www.codeproject.com/KB/recipes/RtfConverter.aspx
>
> I'm sure it would take little (or no) effort to port to Silverlight.
>
> Hope this helps...
>
> Chris
>
>
>
> On 15 May 2010 08:52, Steven Nagy <[email protected]> wrote:
>
>> You’re right to a degree. We get stuff in a variety of formats from
>> different systems. Some are plain text, some are RTF, some are strongly
>> typed classes of data, etc. So RTF is a source type that we have no control
>> over.
>>
>>
>>
>> We also investigated the option of converting RTF to HTML and displaying
>> that in a Html control (I tried all the control vendors controls here as
>> well). Essentially they ‘cheat’ by putting a browser element into
>> Silverlight. The result is that nothing can render over the top of the HTML;
>> its always on top. In our case we do need menus to render over the HTML.
>> There are other work-arounds for this problem but they degrade the user
>> experience.
>>
>>
>>
>> PDF is possible; we could convert to PDF on the server side and return a
>> link to the PDF file. However we are looking for a richer embedded
>> experience where the content being displayed looks like it is part of the
>> page. I’m not sure that we could achieve that with PDF.
>>
>>
>>
>> It’s a shame that we’re up to version 4 of SL and still have to make
>> compromises. I’m too stubborn for that. J
>>
>> However I also realise that it’s a niche problem and SL can’t accommodate
>> all scenarios.
>>
>> *Steven Nagy
>> *Readify | Senior Developer
>>
>> M: +61 404 044 513 | E: [email protected] | B: azure.snagy.name
>>
>>
>>
>> *From:* [email protected] [mailto:
>> [email protected]] *On Behalf Of *Barry Beattie
>> *Sent:* Saturday, 15 May 2010 8:50 AM
>>
>> *To:* ozSilverlight
>> *Subject:* Re: RTF in silverlight
>>
>>
>>
>> just putting on my BA hat for a second
>>
>>
>>
>> I know the service call is spitting out RTF, but why RTF and not, say,
>> PDF? it sounds like you just need to render them, not interact with them.
>>
>>
>>
>> just curious
>>
>>
>>
>>
>>
>>
>>
>> On Sat, May 15, 2010 at 8:11 AM, Steven Nagy <[email protected]>
>> wrote:
>>
>> Thanks for the various responses.
>>
>>
>>
>> The Telerik control – I couldn’t see that it supported RTF. Its funny
>> because there’s lots of RichTextbox controls out there but very few actually
>> support RTF (most have their own versions of WPF’s FlowDocument instead).
>>
>>
>>
>> I suspect these issues are because different companies have different
>> implementations of the specification. Plus the specification has many
>> versions.
>>
>> Plus some writers/readers may be more tolerant to invalid control codes,
>> while others are more strict. What the world needs is an RTF validator where
>> you can post your RTF.
>>
>>
>>
>> I didn’t know Silverlight supported XPS, I’ll investigate that option.
>>
>>
>>
>> Thanks for the sample Carl, I actually need RTF though, including image
>> data which is embedded in the RTF as binary. Pretty much fill RTF support in
>> SL is required.
>>
>>
>>
>> Tried the ComponentOne control as well – didn’t seem to support tables
>> properly either. This seems to be a common problem.
>>
>>
>>
>> Thanks again all.
>>
>> *Steven Nagy
>> *Readify | Senior Developer
>>
>> M: +61 404 044 513 | E: [email protected] | B: azure.snagy.name
>>
>>
>>
>> *From:* [email protected] [mailto:
>> [email protected]] *On Behalf Of *jason schluter
>> *Sent:* Saturday, 15 May 2010 1:02 AM
>> *To:* [email protected]
>> *Subject:* RE: RTF in silverlight
>>
>>
>>
>> Perhaps you can convert it to XPS?
>> ------------------------------
>>
>> From: [email protected]
>> To: [email protected]
>> Date: Thu, 13 May 2010 16:31:31 -0700
>> Subject: RTF in silverlight
>>
>> Hi all,
>>
>>
>>
>> I've got the a bunch of RTF coming from a service call that needs to
>> render.
>>
>> I have two options: Find a control that can render RTF or convert the RTF
>> to something else on the server side that can be rendered natively.
>>
>>
>>
>> For option 1, it seems the new SL4 RichTextbox doesn't support RTF (unless
>> I've missed the mechanism for importing RTF text into the control?). I've
>> trialed the DevExpress tool but it fails to render RTF with tables. I'm
>> currently pulling down the ComponentOne RichTextbox to see if it does any
>> better.
>>
>>
>>
>> I've also tried option 2 - using a WPF rich textbox (in memory only) to
>> load the RTF and then push out various output formats. It supports output to
>> XAML but of course the XAML is not compliant with Silverlight.
>>
>>
>>
>> I have my fingers crossed for the component one control but I'm not
>> hopeful. I was wondering if anyone had any other suggestions on how to
>> approach this and if anyone has found a good RTF control for silverlight.
>>
>>
>>
>> Client side is SL4 and server side is .Net 4.0.
>>
>>
>>
>> Cheers,
>>
>>
>>
>> *Steven Nagy
>> *Readify | Senior Developer
>>
>> M: +61 404 044 513 | E: [email protected] | B: azure.snagy.name
>>
>>
>> _______________________________________________
>> ozsilverlight mailing list
>> [email protected]
>> http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight
>>
>>
>>
>> _______________________________________________
>> ozsilverlight mailing list
>> [email protected]
>> http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight
>>
>>
>
> _______________________________________________
> ozsilverlight mailing list
> [email protected]
> http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight
>
>
_______________________________________________
ozsilverlight mailing list
[email protected]
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight

Reply via email to