Method MergeFiles
MergeFiles(IEnumerable<string>, string)
Merges multiple PDF files into a single output file.
public static void MergeFiles(IEnumerable<string> inputPaths, string outputPath)
Parameters
inputPathsIEnumerable<string>Paths to the source PDF files.
outputPathstringPath 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
inputPathsoroutputPathisnull.- ArgumentException
Thrown when no input paths are provided.
- FileNotFoundException
Thrown when any input file does not exist.