2X faster development
The ultimate WinForms UI toolkit to boost your development speed.
The Syncfusion Essential PDF is a feature-rich and high performance .NET PDF library used to create, read, and edit PDF documents programmatically without Adobe dependencies. This library also offers functionality to merge, split, stamp, forms, compress, and secure PDF files. This sample uses the following PDF documents and explains how to merge them with grouped bookmarks using Syncfusion .NET PDF library. Steps to merge PDF documents with grouped bookmarks programmatically in C#:
C# //Merge PDF file PdfDocumentBase.Merge(document, loadedDocument);
VB.NET 'Merge PDF file PdfDocumentBase.Merge(document, loadedDocument)
C# using Syncfusion.Pdf;
VB.NET Imports Syncfusion.Pdf
C# //Create a new PDF document PdfDocument finalDoc = new PdfDocument(); //Create a string array of source files to be merged string[] source = { "Document1.pdf", "Document2.pdf" }; //Merge the PDF documents PdfDocument.Merge(finalDoc, source); //Save the PDF document finalDoc.Save("MergedDocument.pdf"); //Close the instance of PdfDocument finalDoc.Close(true);
VB.NET 'Create a new PDF document Dim finalDoc As PdfDocument = New PdfDocument 'Create a string array of source files to be merged Dim source() As String = {"Document1.pdf", "Document2.pdf"} 'Merge the PDF documents PdfDocument.Merge(finalDoc, source) 'Save the PDF document finalDoc.Save("MergedDocument.pdf") 'Close the instance of PdfDocument finalDoc.Close(True)
A complete work sample to merge PDF documents with grouped bookmarks can be downloaded from MergePDF.zip. By executing the program, you will get the PDF document as follows. Take a moment to peruse the documentation, where you will find other options like RTF to PDF conversion, XPS to PDF conversion, PDF to image conversion, HTML to MHTML, HTML to SVG, partial webpage to SVG, and more. Click here to explore the rich set of Syncfusion Essential PDF features. An online sample link to convert Word document to PDF, RTF to PDF, XPS to PDF, TIFF to PDF, PDF to Image, and Excel document to PDF. See Also: Merge all PDF files in a folder into single PDF document Note: Starting with v16.2.0.x, if you reference Syncfusion assemblies from trial setup or from the NuGet feed, include a license key in your projects. Refer to link to learn about generating and registering Syncfusion license key in your application to use the components without trail message.
|
2X faster development
The ultimate WinForms UI toolkit to boost your development speed.
This page will automatically be redirected to the sign-in page in 10 seconds.