IRONSOFTWAREHOME
Copying Pages between PDF Files
using IronPdf;

var html_a = @"<p> [PDF_A] </p>
        <p> [PDF_A] 1st Page </p>
        <div style = 'page-break-after: always;' ></div>
        <p> [PDF_A] 2nd Page</p>";

var html_b = @"<p> [PDF_B] </p>
        <p> [PDF_B] 1st Page </p>
        <div style = 'page-break-after: always;' ></div>
        <p> [PDF_B] 2nd Page</p>";

var renderer = new ChromePdfRenderer();

// Create our main document
var pdfdoc_a = renderer.RenderHtmlAsPdf(html_a);


// Create and select a page to copy
var pdfdoc_b = renderer.RenderHtmlAsPdf(html_b);
var page_to_insert = pdfdoc_b.CopyPage(1);

// 3 ways to insert:

pdfdoc_a.AppendPdf(page_to_insert); // at the end
                                    // or
pdfdoc_a.PrependPdf(page_to_insert); // at the start
                                     // or
pdfdoc_a.InsertPdf(page_to_insert, 1); // in the middle

pdfdoc_a.SaveAs("CopiedPages.pdf");
Imports IronPdf

Dim html_a = "<p> [PDF_A] </p>
        <p> [PDF_A] 1st Page </p>
        <div style = 'page-break-after: always;' ></div>
        <p> [PDF_A] 2nd Page</p>"

Dim html_b = "<p> [PDF_B] </p>
        <p> [PDF_B] 1st Page </p>
        <div style = 'page-break-after: always;' ></div>
        <p> [PDF_B] 2nd Page</p>"

Dim renderer = New ChromePdfRenderer()

' Create our main document
Dim pdfdoc_a = renderer.RenderHtmlAsPdf(html_a)

' Create and select a page to copy
Dim pdfdoc_b = renderer.RenderHtmlAsPdf(html_b)
Dim page_to_insert = pdfdoc_b.CopyPage(1)

' 3 ways to insert:

pdfdoc_a.AppendPdf(page_to_insert) ' at the end
                                   ' or
pdfdoc_a.PrependPdf(page_to_insert) ' at the start
                                    ' or
pdfdoc_a.InsertPdf(page_to_insert, 1) ' in the middle

pdfdoc_a.SaveAs("CopiedPages.pdf")
NuGet Download
PM > Install-Package IronPdf
Copying Pages between PDF Files

Copying Pages between PDF Files

Alter the structure of your PDF documents to best fit your needs with ease by utilizing IronPDF to copy pages between your PDF files. Now, you can easily copy a specific PDF page, and either insert it, prepend it, or append it to another PDF document. This gives you full control over where the page will appear and how your PDF documents look.

Learn How to Add, Copy, or Delete PDF Pages with IronPDF
View on GitHub

Ready to Get Started?

Nuget Downloads 20,878,335Version:2026.9just released

Key in blue circle

Get your free 30-day Trial Key instantly.

Your trial license will be sent to your email address

No limitations. 100% unlocked. No credit card.

bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
Book your free Live Demo
Booking Badge

Trusted by Millions of Engineers Worldwide

Iron Software's customer logos
Get Your No-Obligation Consult
Complete the form below or email sales@ironsoftware.com
Your details will always be kept confidential.
Trusted by Millions of Engineers Worldwide
Iron Software's customer logos
Get your free 30-day Trial Key instantly.
No credit card or account creation required