Table of Contents

Method MergeFiles

Namespace
LMKit.Document.Pdf
Assembly
LM-Kit.NET.dll

MergeFiles(IEnumerable<string>, string)

Merges multiple PDF files into a single output file.

public static void MergeFiles(IEnumerable<string> inputPaths, string outputPath)

Parameters

inputPaths IEnumerable<string>

Paths to the source PDF files.

outputPath string

Path where the merged PDF will be written.

Examples

using LMKit.Document;

// Merge three chapter PDFs into a complete book
PdfMerger.MergeFiles(
    new[] { "chapter1.pdf", "chapter2.pdf", "chapter3.pdf" },
    "complete_book.pdf");

Exceptions

ArgumentNullException

Thrown when inputPaths or outputPath is null.

ArgumentException

Thrown when no input paths are provided.

FileNotFoundException

Thrown when any input file does not exist.