Skip to footer content

How to Merge or Split PDF Files in C#

In this tutorial, we explore how to merge and split PDF files using IronPDF in C#. The process begins with installing IronPDF via the NuGet package manager. After importing the IronPDF namespace, we define HTML strings representing PDF pages. Using a Chrome PDF Renderer, we render these strings into two separate PDF documents. We then merge these documents with the PDFDocument.Merge method, saving the result as a merged file. Additionally, we extract individual pages using the CopyPage method, saving them as separate PDF files. The tutorial provides a step-by-step demonstration, concluding with a successful execution of the program, showcasing the merged and split PDFs. Users are encouraged to try IronPDF with a trial link provided in the description.

Further Reading: How to Merge or Split PDFs

Chipego
Software Engineer
Chipego has a natural skill for listening that helps him to comprehend customer issues, and offer intelligent solutions. He joined the Iron Software team in 2023, after studying a Bachelor of Science in Information Technology. IronPDF and IronOCR are the two products Chipego has been focusing on, but his knowledge of all products is growing daily, as he finds new ways to support customers. He enjoys how collaborative life is at Iron Software, with team members from across the company bringing their varied experience to contribute to effective, innovative solutions. When Chipego is away from his desk, he can often be found enjoying a good book or playing football.