RTF Conversion not to 1.5 spec

  •  07-29-2008, 9:42 PM

    RTF Conversion not to 1.5 spec

    Hi
     
    I'm using cute editor (6.1) in a web application, where the entry is stored in SQL Server to be displayed on a report. The report is a rtf and I'm converting the data with CuteEditor.Convertor.RTF.HTML2RTF() function, for this section.

    However it appears to have some problems as the following text entries show:

    This whole sentence is BOLD in CE. But when converting text to rft words that are in ITALICS or UNDERLINED are not displayed in bold. 

    This whole sentence is in ITALICS in CE. But when converting text to rft words that are are BOLD or UNDERLINED are not displayed in Italics. 

    This whole sentence is UNDERLINED in CE. But when converting text to rft nothing is underlined.

    It seems I'm not allowed to add attachments??? anyway the result is as I've indicated in the sentences themselves. Here is the generated RTF.
     
    {"rtf1"ansi"ansicpg1252"deff0"deflang1033{"colortbl;"red0"green0"blue0;}{"fonttbl
    {"f0"fswiss"fcharset1252 Times New Roman;}
    {"f1"fswiss"fcharset1252 arial;}
    }{"*"generator CuteEditor 5.0;}"viewkind4"uc1"pard"cf1"f1"fs20"qj"b1"i0"ulnone This whole sentence is BOLD. But when"'a0converting text to rft words that are in"'a0"cf1"f1"fs20"qj"b1"i1"ulnone ITALICS"cf1"f1"fs20"qj"b1"i0"ulnone  or "cf1"f1"fs20"qj"b1"i0"ul UNDERLINED"cf1"f1"fs20"qj"b1"i0"ulnone  are not displayed in bold."par
    "pard"cf1"f1"fs20"qj"b0"i0"ulnone "'a0"par
    "pard"cf1"f1"fs20"qj"b0"i0"ulnone "cf1"f1"fs20"qj"b0"i1"ulnone This whole sentence is in ITALICS. But when"'a0converting text to rft words that are are "cf1"f1"fs20"qj"b1"i1"ulnone BOLD"cf1"f1"fs20"qj"b0"i1"ulnone  or "cf1"f1"fs20"qj"b0"i1"ul UNDERLINED"cf1"f1"fs20"qj"b0"i1"ulnone  are not displayed in Italics."par
    "pard"cf1"f1"fs20"qj"b0"i0"ulnone "par
    "pard"cf1"f1"fs20"qj"b0"i0"ulnone This whole sentence is UNDERLINED. But when"'a0converting text to rft nothing is underlined.}
     
    Now. What I've found out is that if I place this text into notepad, save it and open it with wordpad, make a small change, re-save it in wordpad and open it again in notepad to see the RTF, it has changed dramatically, like so:
     
    {"rtf1"ansi"ansicpg1252"deff0"deflang1033{"fonttbl{"f0"fswiss"fcharset1 arial;}{"f1"fswiss"fcharset0 Arial;}}
    {"colortbl ;"red0"green0"blue0;}
    {"*"generator Msftedit 5.41.21.2508;}"viewkind4"uc1"pard"qj"cf1"lang32984"b"f0"fs20 This whole sentence is BOLD. But when"~converting text to rft words that are in"~"i ITALICS"i0  or "ul UNDERLINED"ulnone  are not displayed in bold."par
    "b0"~"par
    "i This whole sentece is in ITALICS. But when"~converting text to rft words that are are "b BOLD"b0  or "ul UNDERLINED"ulnone  are not displayed in Italics."par
    "i0"par
    "pard This whole sentence is UNDERLINED. But when"~converting text to rft nothing is underlined."cf0"lang3081"f1"par
    }

    But notice mostly, that the \b1\ has been changed b and b0, (in this window Cute editor has changed all \ to ", don't know why). So what spec is CE using, because it's causing me a lot of trouble. I would appreciate a quick answer if possible.
     
    Also as a matter of interest, I am having some problems with changing bold anf italics and underlined with pasted text. For instance in this window, now where I am typing, if I select existing formatted text I cannot un bold, un underline or un italicise, as in BOLD or UNDERLINED I cannot take the Italics off either of these words, (ps I'm using Firefox).
     
    Thanks
     
     
     
View Complete Thread