Table of Contents
  • Getting Started
  • EO.Pdf
  • EO.Web
  • EO.WebBrowser
  • EO.Wpf
  • Common Topics
  • Reference
    • .NET API Reference
      • EO.Base
      • EO.Base.UI
      • EO.Extensions
      • EO.Pdf
        • EO.Pdf
        • Classes
          • ClientCertificate Class
          • HtmlDocument Class
          • HtmlElement Class
          • HtmlNode Class
          • HtmlTextNode Class
          • HtmlToPdf Class
          • HtmlToPdfException Class
          • HtmlToPdfOptions Class
          • HtmlToPdfResult Class
          • HtmlToPdfSession Class
          • PageInfo Class
          • PageInfoCollection Class
          • PageStyle Class
          • Paginator Class
          • PdfAction Class
          • PdfAttachment Class
          • PdfAttachmentCollection Class
          • PdfBookmark Class
          • PdfBookmarkCollection Class
          • PdfCheckBoxField Class
          • PdfComboBoxField Class
          • PdfDestination Class
          • PdfDocInfo Class
          • PdfDocument Class
          • PdfDocumentEventArgs Class
          • PdfDocumentSecurity Class
          • PdfField Class
          • PdfFieldCollection Class
          • PdfGenericField Class
          • PdfGoToAction Class
          • PdfJavaScriptAction Class
          • PdfLaunchAction Class
          • PdfLink Class
          • PdfListBoxField Class
          • PdfListField Class
          • PdfListItem Class
          • PdfListItemCollection Class
          • PdfObject Class
          • PdfOnOffField Class
          • PdfPage Class
          • PdfPageCollection Class
          • PdfPageEventArgs Class
          • PdfPageLocation Class
          • PdfPageRectangle Class
          • PdfPageSizes Class
          • PdfPortfolio Class
          • PdfPushButtonField Class
          • PdfRadioButtonField Class
          • PdfRadioButtonGroup Class
          • PdfRender Class
          • PdfSigner Class
          • PdfTextField Class
          • PdfUriAction Class
          • PdfViewerException Class
          • PdfViewerPreference Class
          • Runtime Class
          • YRange Class
        • Interfaces
        • Enumerations
        • Delegates
      • EO.Pdf.Acm
      • EO.Pdf.Contents
      • EO.Pdf.Drawing
      • EO.Pdf.Mvc
      • EO.Web
      • EO.WebBrowser
      • EO.WebBrowser.DOM
      • EO.WebEngine
      • EO.WinForm
      • EO.Wpf
      • EO.Wpf.Gauge
      • EO.Wpf.Gauge.Shapes
      • EO.Wpf.Primitives
      • EO.Wpf.Themes.Aero
      • EO.Wpf.Themes.Classic
      • EO.Wpf.Themes.Luna
      • EO.Wpf.Themes.Metro
      • EO.Wpf.Themes.Royale
    • JavaScript API Reference
PdfDocument.Merge Method (String, String, Int32)

Merges two PDF files.

Syntax
 public static void Merge(
   string fileName1,
   string fileName2,
   int bookmarkLevel
);

Parameters

fileName1
Full path of the first PDF file.
fileName2
Full path of the second PDF file.
bookmarkLevel
Specify on which level the second file's bookmarks should be inserted into. See remark section for more details.
Remarks

This function appends the second PDF file to the end of the first PDF file and does not perform a "deep merge". thus can result in bigger file but uses less memory and is much faster.

If either of the source file has bookmarks, then they will be merged into the final file. In case both file has bookmarks, it may be necessary to insert the second file's bookmarks as child bookmarks of a bookmark item in the first file. For example, consider the following bookmark structure:

The first file's bookmarks:

Chapter 1 - Overview Introduction Terms and definitions Chapter 2 - Syntax

The second file's bookmarks:

File Structure Object Types Members

If the desired final bookmarks is:

Chapter 1 - Overview Introduction Terms and definitions Chapter 2 - Syntax File Structure Object Types Members

Then bookmarkLevel should be set to 1, which indicating the second file's bookmarks will be on the second level (0 based).

If bookmarkLevel is set to 0, then all bookmarks for the second file will be directly appended after "Chapter 2":

Chapter 1 - Overview Introduction Terms and definitions Chapter 2 - Syntax File Structure Object Types Members
See Also