New to Telerik Document ProcessingStart a free 30-day trial

Merge PDF Documents

Updated on Sep 8, 2026

RadPdfProcessing supports merging multiple PDF documents into one with these approaches:

See the PdfProcessing Content Merging, Splitting, and Adding Demo for a live example.

Merging with RadFixedDocument

Use the Merge() method of RadFixedDocument when you want to merge fully imported PDF documents. The method clones the source document and appends its supported content to the current RadFixedDocument, including pages and document-level data such as bookmarks, form fields, and destinations:

C#
int timeoutInterval = 100;
string pdfFolderPath = @"..\..\..\Pdf Files";
// Adjust this path to your PDF files directory
string[] pathsCollection = Directory.GetFiles(pdfFolderPath);
RadFixedDocument resultFile = new RadFixedDocument();
PdfFormatProvider pdfFormatProvider = new PdfFormatProvider();

foreach (string path in pathsCollection)
{
    RadFixedDocument document;
    using (Stream stream = File.OpenRead(path))
    {
        document = pdfFormatProvider.Import(stream, TimeSpan.FromSeconds(timeoutInterval));
        resultFile.Merge(document);
    }
} 
string outputFilePath = "merged_by_RadFixedDocument.pdf";
File.Delete(outputFilePath);
using (Stream output = File.OpenWrite(outputFilePath))
{
    pdfFormatProvider.Export(resultFile, output, TimeSpan.FromSeconds(timeoutInterval));
}
Process.Start(new ProcessStartInfo() { FileName = outputFilePath, UseShellExecute = true });

Merging with PdfStreamWriter

Use PdfStreamWriter when you want a low-memory merge flow that streams pages from source PDF files into a new output file:

C#
string pdfFolderPath = @"..\..\..\Pdf Files";
// Adjust this path to your PDF files directory
string[] pathsCollection = Directory.GetFiles(pdfFolderPath);

using (MemoryStream stream = new MemoryStream())
{
    using (PdfStreamWriter fileWriter = new PdfStreamWriter(stream, leaveStreamOpen: true))
    {
        foreach (string path in pathsCollection)
        {
            using (PdfFileSource fileSource = new PdfFileSource(new MemoryStream(File.ReadAllBytes(path))))
            {
                for (int i = 0; i < fileSource.Pages.Length; i++)
                {
                    PdfPageSource sourcePage = fileSource.Pages[i];
                    using (PdfPageStreamWriter resultPage = fileWriter.BeginPage(sourcePage.Size))
                    {
                        resultPage.WriteContent(sourcePage);
                    }
                }
            }
        }
    }


    string outputFilePath = "merged_by_PdfStreamWriter.pdf";
    File.Delete(outputFilePath);
    using (FileStream fileStream = new FileStream(outputFilePath, FileMode.Create, FileAccess.Write))
    {
        stream.WriteTo(fileStream);
    }

    Process.Start(new ProcessStartInfo() { FileName = outputFilePath, UseShellExecute = true });
}

The Manipulate Pages SDK demo shows this approach end to end.

See Also