RTF Conversion not to 1.5 spec

Last post 08-07-2008, 1:04 AM by Adam. 12 replies.
Sort Posts: Previous Next
  •  07-29-2008, 9:42 PM 42626

    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
     
     
     
  •  07-31-2008, 4:57 PM 42661 in reply to 42626

    Re: RTF Conversion not to 1.5 spec

    any chance of an answer on this, even an acknowledgment of the question would be good
  •  07-31-2008, 5:57 PM 42664 in reply to 42626

    Re: RTF Conversion not to 1.5 spec

    MarkHolden,
     
    This issue is introduced in version 6.1. We will fix it as soon as possible.

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  07-31-2008, 7:08 PM 42666 in reply to 42664

    Re: RTF Conversion not to 1.5 spec

    Hi Adam
     
    When you say "This issue is introduced" are you talking about my reference to the underline or the rtf spec? 
    When you say as soon as possible, does that mean soon, in the next week, the next month, etc. should I roll back to v6? There are also some other issues with the rtf conversion not being the same as the standard 1.5 spec, for instance bullets and numbering lose their tab position, in other words there is no paragraph indenting like so "pard"fi-284"li852" and the bullet is reduced to a full stop, plus if a point needs to wrap the first line is pushed back to the margin. I have applied a number of fixes to the rtf converted like so
     
                'Replaces the built in cute editor font face and size
                strRTF = strRTF.Replace("Times New Roman;}", "Arial;}")          
                'Removes the empty paragraph at the top of a ul or ol list which is added by cute rft conversion
                strRTF = strRTF.Replace(""viewkind4"uc1"pard"cf1"f1"fs20"qj"b0"i0"ulnone  "par", ""viewkind4")
                'replaces the default full text justification setting
                strRTF = strRTF.Replace(""qj"", ""ql"")
                'replace CE's weird "b1" tag with b
                'strRTF = strRTF.Replace(""b1"", ""b "")
               'Add the correct bullet type with paragraph settings
                strRTF = strRTF.Replace("{"pntext"'B7"tab}", ""pard"fi-284"li852"ql {"pntext"bullet"tab}")
                'Gets a limited count of bullet and number points and sets the tab position
                For n As Integer = 0 To 50
                    strRTF = strRTF.Replace("{"pntext " & n & ""tab}", ""pard"fi-284"li852"ql " & n & ". ")
                Next

    but as you can see ,
     
    1.) I shouldn't have to

    2). I have limited the numbering to 50, hopefully clients won't use more than 50, but this is patchy programming for a silly work around. I need an rtf converter that conforms to a standard spec, or at least show me the specification cute rtf converter works to, or better please expose the rtf stylesheet for customer editing.


    Thank you


    Mark
  •  08-01-2008, 7:55 PM 42697 in reply to 42626

    Re: RTF Conversion not to 1.5 spec

    HELLO!!!!!
     
    Only just evaluating cute editor, not very impressed with the forum so far.
     
     
  •  08-02-2008, 6:56 PM 42701 in reply to 42697

    Re: RTF Conversion not to 1.5 spec

    OK that's it, I could not buy a product where the support forum is this bad
  •  08-05-2008, 10:43 AM 42741 in reply to 42626

    Re: RTF Conversion not to 1.5 spec

    Add the following code the bottom of your page, it will make the underline function work as version 6.0.
     
    <script>
    function CuteEditor_OnCommand(editor,command,ui,value)
      {
       //handle the command by yourself
       if(command=="underline")
       {
         //Get the editor content 
         var editdoc=editor.GetDocument();
         editdoc.execCommand("underline");
         return true;
       }
      }
    </script>
     
    This should fix the issue.

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  08-05-2008, 6:42 PM 42764 in reply to 42741

    Re: RTF Conversion not to 1.5 spec

    What a strange forum this is.....
     
    On the 29th... thats over 1 week ago, I spent a while laying out my issue with the rtf converter, all in all about 30 lines, as a by the way I mentioned that underlining was not working consistently. It was a small issue and one I had already fixed by searching the documentation myself anyway.
     
    But you have ignored my main issue ????????
     
    even though you seem to think you have given me a fix.!!!
     
    Please read the whole post, you will notice that I had already concluded that the forum was badly managed. I predicted that if I recommended the cute editor to my organisation, that we would have nothing but frustration with the technical support.
  •  08-05-2008, 7:40 PM 42765 in reply to 42764

    Re: RTF Conversion not to 1.5 spec

     
    This new converter is not released yet. However if you need it we can send this DLL to you.

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  08-05-2008, 8:30 PM 42766 in reply to 42765

    Re: RTF Conversion not to 1.5 spec

    send it to me at [email protected] or email me a download link, if it works I'll re consider purchasing
     
    thank you
     

  •  08-06-2008, 11:54 PM 42795 in reply to 42767

    Re: RTF Conversion not to 1.5 spec


    i was very interested to get this working to see if the rtf returned is more consistent, but unfortunately no matter what html I sent to it all I could get was:
     
    {"rtf1"ansi"ansicpg1252"deff0{"fonttbl}
    {"colortbl;"red0"green0"blue0;}
    {"info}
    }
     
    I simply added the dll to the projects bin folder and put the folllowing line in the code:
     
    strRTF = FileConverter.HTML2RTF(strHTML)

    where strHTML was a well formed html string, but the same rtf was retruned no matter what the input was.
     
    any ideas?

  •  08-07-2008, 1:04 AM 42801 in reply to 42795

    Re: RTF Conversion not to 1.5 spec

    MarkHolden,
     
    Please post your code.
     
    The following syntax is correct.
     
    string rtf = FileConverter.HTML2RTF(xhtml)
     
    For some reasons, you are not able to pass the XHTML code to the converter.

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View as RSS news feed in XML