• 大小: 1.03MB
    文件类型: .zip
    金币: 2
    下载: 1 次
    发布日期: 2023-10-14
  • 语言: Html/CSS
  • 标签: RtfToHtml  

资源简介

SautinSoft.RtfToHtml破解版直接在内存中将rtf字符串改为html代码 1. 去掉30000字符限制; 2. 去掉生成HTML代码后的购买说明; 3. 去掉了一些不标准的HTML标签,生成的 HTML 代码符合 XHTML 标准。

资源截图

代码片段和文件信息

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.IO;

public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender EventArgs e)
    {
        Result.Text = ““;
    }
    protected void Button1_Click(object sender EventArgs e)
    {
        if (FileUpload1.PostedFile.FileName.Length == 0 || FileUpload1.FileBytes.Length==0)
        {
            Result.Text = “Please select RTF or Text file before start converting!“;
            return;
        }
        Result.Text = “Converting ...“;

        SautinSoft.RtfToHtml r = new SautinSoft.RtfToHtml();
        r.OutputFormat = SautinSoft.eOutputFormat.HTML_401;
        r.Imagestyle.IncludeImageInHtml = false; //To save images inside HTML as binary data specify this property to ‘true‘

        r.Imagestyle.ImageFolder = Server.MapPath(““); 
        r.Imagestyle.ImageSubFolder = “images“;
        r.Imagestyle.ImageFileName = “picture“;       


        string html = ““;
        string rtf = ByteToString(FileUpload1.FileBytes);

        html = r.ConvertString(rtf);        
        
        //show HTML
        if (html.Length>0)
        {
            Response.Buffer = true;
            Response.Clear();
            Response.ContentType = “text/html“;
            Response.Write(html);
            Response.Flush();
            Response.End();
        }
        else
        {
            Result.Text = “Converting failed!“;
        }
    }
    private string ByteToString(byte[] b)
    {
        System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding();
        return encoding.GetString(b);
    }

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件       18843  2010-07-02 13:48  SND.nfo
     目录           0  2010-07-02 13:38  RTF-to-HTML DLL .Net (3.0.2.84)\
     目录           0  2010-03-31 10:24  RTF-to-HTML DLL .Net (3.0.2.84)\Code samples\
     文件        8453  2008-03-17 16:36  RTF-to-HTML DLL .Net (3.0.2.84)\Code samples\test.rtf
     目录           0  2010-03-31 10:24  RTF-to-HTML DLL .Net (3.0.2.84)\Code samples\VS2003\
     目录           0  2010-03-31 10:24  RTF-to-HTML DLL .Net (3.0.2.84)\Code samples\VS2003\C#\
     目录           0  2010-03-31 10:24  RTF-to-HTML DLL .Net (3.0.2.84)\Code samples\VS2003\C#\ASP.Net - Convert RTF to HTML\
     目录           0  2010-03-31 10:24  RTF-to-HTML DLL .Net (3.0.2.84)\Code samples\VS2003\C#\ASP.Net - Convert RTF to HTML\Bin\
     文件         126  2009-12-10 15:07  RTF-to-HTML DLL .Net (3.0.2.84)\Code samples\VS2003\C#\ASP.Net - Convert RTF to HTML\Bin\SautinSoft.RtfToHtml.dll.refresh
     文件       12905  2009-09-10 15:31  RTF-to-HTML DLL .Net (3.0.2.84)\Code samples\VS2003\C#\ASP.Net - Convert RTF to HTML\box.jpg
     文件        3832  2009-12-23 08:44  RTF-to-HTML DLL .Net (3.0.2.84)\Code samples\VS2003\C#\ASP.Net - Convert RTF to HTML\Default.aspx
     文件        1870  2009-12-10 16:10  RTF-to-HTML DLL .Net (3.0.2.84)\Code samples\VS2003\C#\ASP.Net - Convert RTF to HTML\Default.aspx.cs
     目录           0  2010-03-31 10:24  RTF-to-HTML DLL .Net (3.0.2.84)\Code samples\VS2003\C#\ASP.Net - Convert RTF to HTML\images\
     目录           0  2010-03-31 10:24  RTF-to-HTML DLL .Net (3.0.2.84)\Code samples\VS2003\C#\Console-convert RTF file to HTML file\
     文件        1192  2009-12-24 11:32  RTF-to-HTML DLL .Net (3.0.2.84)\Code samples\VS2003\C#\Console-convert RTF file to HTML file\Class1.cs
     文件        3931  2009-11-10 10:48  RTF-to-HTML DLL .Net (3.0.2.84)\Code samples\VS2003\C#\Console-convert RTF file to HTML file\SampleConvert.csproj
     文件         911  2009-10-30 08:30  RTF-to-HTML DLL .Net (3.0.2.84)\Code samples\VS2003\C#\Console-convert RTF file to HTML file\SampleConvert.sln
     目录           0  2010-03-31 10:24  RTF-to-HTML DLL .Net (3.0.2.84)\Code samples\VS2003\C#\Console-convert RTF file to HTML string\
     文件        1532  2009-12-24 11:32  RTF-to-HTML DLL .Net (3.0.2.84)\Code samples\VS2003\C#\Console-convert RTF file to HTML string\Class1.cs
     文件        3931  2009-11-10 10:48  RTF-to-HTML DLL .Net (3.0.2.84)\Code samples\VS2003\C#\Console-convert RTF file to HTML string\SampleConvert.csproj
     文件         911  2009-10-30 08:30  RTF-to-HTML DLL .Net (3.0.2.84)\Code samples\VS2003\C#\Console-convert RTF file to HTML string\SampleConvert.sln
     目录           0  2010-03-31 10:24  RTF-to-HTML DLL .Net (3.0.2.84)\Code samples\VS2003\C#\Console-convert RTF string to HTML file\
     文件        1651  2009-12-24 11:34  RTF-to-HTML DLL .Net (3.0.2.84)\Code samples\VS2003\C#\Console-convert RTF string to HTML file\Class1.cs
     文件        3931  2009-11-10 10:48  RTF-to-HTML DLL .Net (3.0.2.84)\Code samples\VS2003\C#\Console-convert RTF string to HTML file\SampleConvert.csproj
     文件         911  2009-10-30 08:30  RTF-to-HTML DLL .Net (3.0.2.84)\Code samples\VS2003\C#\Console-convert RTF string to HTML file\SampleConvert.sln
     目录           0  2010-03-31 10:24  RTF-to-HTML DLL .Net (3.0.2.84)\Code samples\VS2003\C#\Console-convert RTF string to HTML string\
     文件        1974  2009-12-24 11:34  RTF-to-HTML DLL .Net (3.0.2.84)\Code samples\VS2003\C#\Console-convert RTF string to HTML string\Class1.cs
     文件        3931  2009-11-10 10:48  RTF-to-HTML DLL .Net (3.0.2.84)\Code samples\VS2003\C#\Console-convert RTF string to HTML string\SampleConvert.csproj
     文件         911  2009-10-30 08:30  RTF-to-HTML DLL .Net (3.0.2.84)\Code samples\VS2003\C#\Console-convert RTF string to HTML string\SampleConvert.sln
     目录           0  2010-03-31 10:24  RTF-to-HTML DLL .Net (3.0.2.84)\Code samples\VS2003\C#\WinForms-convert RTF file to HTML file\
     文件        2169  2009-12-24 12:33  RTF-to-HTML DLL .Net (3.0.2.84)\Code samples\VS2003\C#\WinForms-convert RTF file to HTML file\Form1.cs
............此处省略185个文件信息

评论

共有 条评论

相关资源