Paste from esternal source issues

4 posts, 0 answers
  1. Daní
    Daní avatar
    303 posts
    Member since:
    Feb 2008

    Posted 09 Jan 2013 Link to this post

    Hi,

    I have an application that allows users to create annotations that are persisted in a database and then can be retrievied read them. I have detected some formating errors when reading these annotations, some paragraphs are not shown, missing some text despite the full text is present in formatted xaml. I think the reason is a paste from an external source (worf, browser, pdf,...). After checking the erroneous annotations xaml, I can see non usuals font families as "Symbols" or "Wingdings".

    How can I deal with this issues. What's the best strategy to allow paste from external source and formatting correctly?

    thanks
  2. Petya
    Admin
    Petya avatar
    975 posts

    Posted 11 Jan 2013 Link to this post

    Hello Dani,

    I am a bit confused what is your exact scenario.

    You say you are exporting/importing a document to a database. If this is the case, what is the relation with pasting from external format?

    Overall, pasting from external sources such as MS Word or a browser will indeed result in loss of formatting due to Silverlight's clipboard not supporting rich-text. This should not be causing any loss of actual contents though - paragraphs, text and so on. As for your remark about the fonts - I am not sure what you mean. Was your document exported with those fonts and not imported correctly?

    If you think it may help us in faster pinpointing the issue you can open a support ticket and attach the file you are trying to import, so we can investigate it. Any additional details will be appreciated.
     
    Greetings,
    Petya
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
  4. Daní
    Daní avatar
    303 posts
    Member since:
    Feb 2008

    Posted 11 Jan 2013 Link to this post

    Hi Petya,

    Thanks for your interest.

    First of all, my apologizes for my horrible explanation. I'll try to explain the scenario again.

    Users can write annotations with a RichTextBox and save thes annotation to the backend. The backend saves the RadDocument xaml into a data base field. These annotations can be reviewed. I've received some incedences about bad formatting and 'losses' of some text fragments in a few of annotations. Revising these conflicting annotations I can observe that all of them are using non common fonts such as Symbol and Wingdings. I suspect this is the result of a paste from an external source.

    Hope the scenario becomes more clear.

    Daní
  5. Boby
    Admin
    Boby avatar
    595 posts

    Posted 15 Jan 2013 Link to this post

    Hello Daní,
    The only way I can think of to create spans with fonts which are not among the default ones is through import process - for example from docx or RTF document. If the document is created on one machine and transferred to another (where the additional font is not present), this could lead to improper visualization of the span (for example with squares).
    You can avoid such issue by validating that all spans/paragraphs in the document has fonts among the default fonts supported by Silverlight.

    Kind regards,
    Boby
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top