This sample shows how to append an existing PDF document to the end of your current document using PdfDocument.Append method.
using System.Diagnostics; namespace BitMiracle.Docotic.Pdf.Samples { public static class MergeDocuments { public static void Main() { // NOTE: // When used in trial mode, the library imposes some restrictions. // Please visit http://bitmiracle.com/pdf-library/trial-restrictions.aspx // for more information. PdfDocument pdf = new PdfDocument(); pdf.Open("Sample data/form.pdf"); pdf.Append("Sample data/jfif3.pdf"); string pathToFile = "MergeDocuments.pdf"; pdf.Save(pathToFile); pdf.Dispose(); Process.Start(pathToFile); } } }
Imports System.Diagnostics Imports BitMiracle.Docotic.Pdf Namespace BitMiracle.Docotic.Pdf.Samples Public NotInheritable Class MergeDocuments Public Shared Sub Main() ' NOTE: ' When used in trial mode, the library imposes some restrictions. ' Please visit http://bitmiracle.com/pdf-library/trial-restrictions.aspx ' for more information. Dim pdf As New PdfDocument() pdf.Open("Sample data/form.pdf") pdf.Append("Sample data/jfif3.pdf") Dim pathToFile As String = "MergeDocuments.pdf" pdf.Save(pathToFile) pdf.Dispose() Process.Start(pathToFile) End Sub End Class End Namespace
