# Merge PDF files locally

Merge two to ten PDF files in your selected order, keep the source files unchanged, and download a separate PDF with page and policy evidence.

Organize PDF pages

[Merge PDFs in the browser](/browser/merge-pdfs/) [Read the .NET guide](/docs/pdf/operations/)

Merge summary

**Input**

Two to ten PDFs

**Output**

Merged PDF

**Package**

[OfficeIMO.Pdf on NuGet](https://www.nuget.org/packages/OfficeIMO.Pdf)

**Runs on**

Browser-local WebAssembly or .NET

**Microsoft Office**

Not required

**License**

MIT

The browser accepts two to ten PDFs, up to 25 MiB each and 75 MiB combined.

[Browse all PDF workflows](/pdf/)

Practical steps

## Merge PDF files in a controlled order

Combine complete documents through one first-party merge pass and retain the operation report.

1. **Select**Choose between two and ten PDF files.
2. **Order**Arrange the files in the sequence that should appear in the output.
3. **Merge**Create and download the merged PDF and its JSON operation report.

The merge workflow copies complete page trees into a new document. The browser presents the selected order explicitly and returns output page count and policy decisions with the artifact.

## Merge from .NET

```csharp
using OfficeIMO.Pdf;

PdfDocument first = PdfDocument.Load("cover.pdf");
PdfDocument second = PdfDocument.Load("report.pdf");

PdfMergeResult result = PdfDocument.MergeResult(
    new PdfMergeOptions(),
    first,
    second);

File.WriteAllBytes("combined.pdf", result.ToBytes());
Console.WriteLine($"Pages: {result.Report.OutputPageCount}");
```

`PdfMergeOptions` controls how the application handles incoming metadata, destinations, forms, attachments, encryption, and signature-related evidence. Keep the report when those choices affect compliance or downstream review.

## Boundaries

The browser route does not modify any selected file. It creates one new PDF and a companion report. Encrypted inputs still require a supported authentication context, and merging a signed document creates a new revision-independent artifact rather than extending or preserving the original signature guarantee.

## API used on this page

- [`PdfDocument`](/api/pdf/officeimo-pdf-pdfdocument/)
- [`PdfMergeOptions`](/api/pdf/officeimo-pdf-pdfmergeoptions/)
- [`PdfMergeResult`](/api/pdf/officeimo-pdf-pdfmergeresult/)

<!-- PowerForge markdown artifact sha256:BEF948458B30BBB3C34F1B540C18F0F063B0A34BDA9DD82CDD01F88E63C4E1C5 -->
