Merge two RTF files and create new sinlge RTF document. Output file will be overwritten.
Namespace:
SautinSoftAssembly: SautinSoft.HtmlToRtf (in SautinSoft.HtmlToRtf.dll) Version: 4.6.10.19
Syntax
| C# | Visual Basic |
Parameters
- rtfFilePath1
- String
Path to 1st RTF document
- rtfFilePath2
- String
Path to 2nd RTF document
- singleMergedRtf
- String
Local path to save output RTF
Return Value
0 - merged successfully1 - can't open 1st RTF document
2 - can't open 2nd RTF document
3 - merging failed
4 - can't create output file, check the output path
Remarks
A merged RTF document will contain 1st RTF document and next 2nd RTF document by order.


Examples
using System; using System.IO; namespace Sample { class Test { static void Main(string[] args) { //Merge two RTF files //If you need more information about HTML-to-RTF Pro DLL .Net email us at: //support[at]sautinsoft.com SautinSoft.HtmlToRtf objH = new SautinSoft.HtmlToRtf(); //objH.Serial = "XXXXXXXXXXXXXXX"; //Merge two RTF files and create new sinlge RTF document int ret = objH.MergeRtfFile(@"d:\report1.rtf", @"d:\report2.rtf", @"d:\single.rtf"); /// <returns> /// 0 - merged successfully<br /> /// 1 - can't open 1st RTF document<br /> /// 2 - can't open 2nd RTF document<br /> /// 3 - merging failed<br /> /// 4 - can't create output file, check the output path<br /> /// </returns> if(ret==0 ) { System.Diagnostics.Process.Start(@"d:\single.rtf"); } } } }
Imports System Imports System.IO Imports System.Text Module Module1 Sub Main() 'Merge two RTF files 'If you need more information about HTML-to-RTF Pro DLL .Net email us at: 'support[at]sautinsoft.com Dim objH As New SautinSoft.HtmlToRtf 'objH.Serial = "XXXXXXXXXXXXXXX"; 'Merge two RTF files and create new sinlge RTF document Dim ret As Integer = objH.MergeRtfFile("d:\report1.rtf", "d:\report2.rtf", "d:\single.rtf") ''' <returns> ''' 0 - merged successfully<br /> ''' 1 - can't open 1st RTF document<br /> ''' 2 - can't open 2nd RTF document<br /> ''' 3 - merging failed<br /> ''' 4 - can't create output file, check the output path<br /> ''' </returns> If ret = 0 Then System.Diagnostics.Process.Start("d:\single.rtf") End If End Sub End Module