通过脚本组件将RTF转换为文本格式 [英] Convert RTF to Text Format through Script Component

查看:78
本文介绍了通过脚本组件将RTF转换为文本格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Script Component中预先编写了VB代码,用于将RTF数据转换为纯文本 

I have pre written VB Code in Script Component for converting RTF Data to Plain Text 

    Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer)
        '
        Try

            Dim enc As New System.Text.UTF8Encoding()
            Dim RTFConvert As RichTextBox = New RichTextBox
            RTFConvert.Rtf = enc.GetString(Row.Body.GetBlobData(0, Convert.ToInt32(Row.Body.Length)))
            Row.ConvertedBody.ResetBlobData()
            Row.ConvertedBody.AddBlobData(System.Text.Encoding.UTF8.GetBytes(RTFConvert.Text))
        Catch E As Exception
            E.Message.ToString()
        End Try
    End Sub

End Class


我得到一个奇怪的错误,其中脚本组件只转换RTF数据9000行,之后不转换。任何人都可以让我知道替代品。谢谢 



Srikanth

I am getting a Weird Error in which Script Component Converts RTF Data for only 9000 rows and does not convert after that.Can anyone please let me know alternative..Thanks 


Srikanth

推荐答案


的限制
RichTextBox 


我怀疑


这篇关于通过脚本组件将RTF转换为文本格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆