Click here to Skip to main content
16,019,618 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Actually i have multiple rtf files.I want to create single PDF from this multiple file.actually i am trying this but only single rtf file convert into pdf using SpireDoc.
this is code for pdf from single PDF.....

C#
private void button1_Click(object sender, EventArgs e)
       {
           //Create word document
           Document document = new Document();

 Section section = document.AddSection();            
            document.LoadFromFile("KPI000006.rtf", FileFormat.Rtf);                      
            //document.SaveToFile("New.pdf", FileFormat.PDF);
            document.Sections[0].Paragraphs[3].AppendBreak(BreakType.PageBreak);
            document.LoadFromFile("KPI000007.rtf", FileFormat.Rtf);//Launching the pdf reader to open.
            document.SaveToFile("New.pdf", FileFormat.PDF);
            FileViewer("New.pdf");
        }
    private void FileViewer(string fileName)
        {
            try
            {
                System.Diagnostics.Process.Start(fileName);
            }
            catch { }
        }

so please give me code for PDF file from multiple rtf files...
Posted
Comments
ZurdoDev 23-Jan-14 10:10am    
Some pdf drivers allow appending when writing to pdf. You should look into SpireDoc to see if it has a setting for that.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900