Table of Contents

Class PdfMerger

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

Provides methods to merge multiple PDF documents into a single PDF.

public static class PdfMerger
Inheritance
PdfMerger
Inherited Members

Examples

Example: Merge PDF files into one

using LMKit.Document;

// Merge three PDF files into a single output file
PdfMerger.MergeFiles(
    new[] { "chapter1.pdf", "chapter2.pdf", "chapter3.pdf" },
    "complete_book.pdf");

Remarks

The PdfMerger class operates on PDF Attachment instances or file paths and produces a new merged Attachment or output file combining all pages from the source documents in order.

Methods

Merge(IEnumerable<Attachment>)

Merges multiple PDF attachments into a single attachment containing all pages in order.

Merge(IEnumerable<string>)

Merges multiple PDF files into a single attachment containing all pages in order.

MergeFiles(IEnumerable<string>, string)

Merges multiple PDF files into a single output file.

MergeToFile(IEnumerable<Attachment>, string)

Merges multiple PDF attachments into a single output file.