Click or drag to resize

RtfToHtmlHtmlImageSavingArgs Class

Provides data for the ImageSaving(HtmlImageSavingArgs) event.
Inheritance Hierarchy

Namespace: SautinSoft
Assembly: SautinSoft.RtfToHtml (in SautinSoft.RtfToHtml.dll) Version: 2024.6.6
public sealed class HtmlImageSavingArgs

The RtfToHtmlHtmlImageSavingArgs type exposes the following members.

Public propertyImageFileName Gets or sets the file name (without path) where the image will be saved to.
Public propertyImageFormat Gets and sets a format of the image stored inside ImageStream property. Default value: Unknown.
Public propertyCode exampleImageStream Allows to specify the stream where the image will be saved to.
Public propertyKeepImageStreamOpen Specifies whether keep the stream open or close it after saving an image.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Convert Text file to HTML file in C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using SautinSoft;

namespace Example
    class Program
        static void Main(string[] args)
        /// <summary>
        /// Converts Text file to HTML file.
        /// </summary>
        static void ConvertTextToHtml()
            string inpFile = @"..\..\..\example.txt";
            string outfile = Path.GetFullPath("Result.html");

            RtfToHtml r = new RtfToHtml();
            r.Convert(inpFile, outfile, new RtfToHtml.HtmlFixedSaveOptions() {Title = "SautinSoft Example." });

            // Open the result for demonstration purposes.
            System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo(outfile) { UseShellExecute = true });
Convert Text file to HTML file in VB.Net
Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Text
Imports System.IO
Imports SautinSoft

Namespace Example
    Friend Class Program
        Shared Sub Main(ByVal args() As String)
        End Sub
        ''' <summary>
        ''' Converts Text file to HTML file.
        ''' </summary>
        Private Shared Sub ConvertTextToHtml()
            Dim inpFile As String = "..\..\..\example.txt"
            Dim outfile As String = Path.GetFullPath("Result.html")

            Dim r As New RtfToHtml()
            r.Convert(inpFile, outfile, new RtfToHtml.HtmlFixedSaveOptions() With {.Title = "SautinSoft Example."})

            ' Open the result for demonstration purposes.
            System.Diagnostics.Process.Start(New System.Diagnostics.ProcessStartInfo(outfile) With {.UseShellExecute = True})
        End Sub
    End Class
End Namespace
See Also