HtmlToRtfMergeSetup Property |
Gets and sets options to merge RTF documents.
Namespace: SautinSoftAssembly: SautinSoft.HtmlToRtf (in SautinSoft.HtmlToRtf.dll) Version: 2024.12.12
Syntax public HtmlToRtfMergeOptions MergeSetup { get; set; }
Public Property MergeSetup As HtmlToRtfMergeOptions
Get
Set
Property Value
HtmlToRtfMergeOptionsExample Merge two RTF documents in memory using C#
using System;
using System.IO;
using static SautinSoft.HtmlToRtf;
namespace Sample
{
class Test
{
static void Main(string[] args)
{
MergeRtfsInMemory();
}
public static void MergeRtfsInMemory()
{
SautinSoft.HtmlToRtf h = new SautinSoft.HtmlToRtf();
string rtfString1 = File.ReadAllText(@"..\..\..\footer.rtf");
string rtfString2 = File.ReadAllText(@"..\..\..\footer.rtf");
h.MergeSetup.PageBreakBetweenDocuments = true;
string rtfSingle = h.MergeRtfString(rtfString1, rtfString2);
if (!String.IsNullOrEmpty(rtfSingle))
{
string singleRtfFile = "Single.rtf";
File.WriteAllText(singleRtfFile, rtfSingle);
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo(singleRtfFile) { UseShellExecute = true });
}
}
}
}
Merge two RTF documents in memory using VB.Net
Imports System
Imports System.IO
Imports SautinSoft.HtmlToRtf
Namespace Sample
Friend Class Test
Shared Sub Main(ByVal args() As String)
MergeRtfsInMemory()
End Sub
Public Shared Sub MergeRtfsInMemory()
Dim h As New SautinSoft.HtmlToRtf()
Dim rtfString1 As String = File.ReadAllText("..\..\..\footer.rtf")
Dim rtfString2 As String = File.ReadAllText("..\..\..\footer.rtf")
h.MergeSetup.PageBreakBetweenDocuments = True
Dim rtfSingle As String = h.MergeRtfString(rtfString1, rtfString2)
If Not String.IsNullOrEmpty(rtfSingle) Then
Dim singleRtfFile As String = "Single.rtf"
File.WriteAllText(singleRtfFile, rtfSingle)
System.Diagnostics.Process.Start(New System.Diagnostics.ProcessStartInfo(singleRtfFile) With {.UseShellExecute = True})
End If
End Sub
End Class
End Namespace
See Also