English Indonesia Tiếng Việt عربي Español Italiano Türk فارسی Français Português Русский ไทย

Merge Files with C#

Modern application development often requires merging multiple files into one. Wordize for .NET provides a simple and efficient API for this task. Using our product, you can quickly implement file merging functionality without complex configurations.

The library is specifically designed for C# developers and allows you to combine documents of various formats while preserving their structure, styles, and formatting. This significantly simplifies document processing automation in .NET projects.

Functional Capabilities for C# Developers

  • Merge documents of different formats with a single line of C# code
  • Support for popular formats: DOCX, PDF, HTML, ODT, RTF, JPG, PNG, and many others
  • High-performance processing of large document sets

File Merging Tasks in C# Applications

  • Combining multiple reports into a single document
  • Merging chapters or sections to create comprehensive technical documentation
  • Compiling documents from different sources into standardized packages
  • Generating consolidated documents for analytics and reporting

You can test the file merging capabilities using the online demonstration on this page. Upload several files, examine the C# code example, perform the file merge operation, and evaluate the result.

C#
Run code
Test Wordize SDK - upload multiple files and explore code example
Upload other documents for merging
Select the target format from the list
using Wordize.Merging;

Merger.Merge("Output.pdf", 
    [
        "Input1.docx", 
        "Input2.docx" 
    ]);
using Wordize.Merging; Merger.Merge("Output.pdf", [ "Input1.docx", "Input2.docx" ]); using Wordize.Merging; using Wordize.Saving; var imageStreams = Merger.MergeToImages( ["Input1.docx", "Input2.docx"], new ImageSaveOptions(SaveFormat.Pdf) { PageLayout = MultiPageLayout.Vertical(10) }, MergeFormatMode.KeepSourceFormatting ); using var file = File.Create($"Output.pdf"); imageStreams[0].Position = 0; imageStreams[0].CopyTo(file); using Wordize.Merging; using Wordize.Saving; ImageSaveOptions saveOptions = new ImageSaveOptions(saveFormat); saveOptions.PageLayout = MultiPageLayout.Vertical(10); Merger.Create() .From("Input1.docx") .From("Input2.docx") .To("Output.pdf", saveOptions) .Execute(); using Wordize.Merging; Merger.Create() .From("Input1.docx") .From("Input2.docx") .To("Output.pdf", SaveFormat.Pdf) .Execute();
Run code

How to merge multiple Word, PDF documents in C#

  1. Integrate Wordize for .NET into your C# project
  2. Call the Merge method, specifying the list of input files and output file name as parameters. Formats will be automatically detected based on file extensions
  3. Get the merged file
5%