---
title: "Aspose::Pdf::Document::Merge method"
url: "https://reference.aspose.com/pdf/cpp/aspose.pdf/document/merge/"
product: "Aspose.PDF for C++ API Reference"
description: "Aspose::Pdf::Document::Merge method. Merges documents in C++."
---

## Document::Merge(const System::ArrayPtr\<System::SharedPtr\<Document\>\>\&) method


Merges documents.

```cpp
void Aspose::Pdf::Document::Merge(const System::ArrayPtr<System::SharedPtr<Document>> &documents)
```


| Parameter | Type | Description |
| --- | --- | --- |
| documents | const System::ArrayPtr\<System::SharedPtr\<Document\>\>\& | The documents to merge. |

## See Also

* Typedef [ArrayPtr](../../../system/arrayptr/)
* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [Document](../)
* Namespace [Aspose::Pdf](../../)
* Library [Aspose.PDF for C++](../../../)
## Document::Merge(const System::ArrayPtr\<System::String\>\&) method


Merges pdf files.

```cpp
void Aspose::Pdf::Document::Merge(const System::ArrayPtr<System::String> &files)
```


| Parameter | Type | Description |
| --- | --- | --- |
| files | const System::ArrayPtr\<System::String\>\& | The pdf-files to merge. |

## See Also

* Typedef [ArrayPtr](../../../system/arrayptr/)
* Class [String](../../../system/string/)
* Class [Document](../)
* Namespace [Aspose::Pdf](../../)
* Library [Aspose.PDF for C++](../../../)
## Document::Merge(const System::SharedPtr\<Document::MergeOptions\>\&, const System::ArrayPtr\<System::SharedPtr\<Document\>\>\&) method


Merges documents.

```cpp
void Aspose::Pdf::Document::Merge(const System::SharedPtr<Document::MergeOptions> &mergeOptions, const System::ArrayPtr<System::SharedPtr<Document>> &documents)
```


| Parameter | Type | Description |
| --- | --- | --- |
| mergeOptions | const System::SharedPtr\<Document::MergeOptions\>\& | The merge options. |
| documents | const System::ArrayPtr\<System::SharedPtr\<Document\>\>\& | The documents to merge. |

## See Also

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [MergeOptions](../mergeoptions/)
* Typedef [ArrayPtr](../../../system/arrayptr/)
* Class [Document](../)
* Namespace [Aspose::Pdf](../../)
* Library [Aspose.PDF for C++](../../../)
## Document::Merge(const System::SharedPtr\<Document::MergeOptions\>\&, const System::ArrayPtr\<System::String\>\&) method


Merges documents.

```cpp
void Aspose::Pdf::Document::Merge(const System::SharedPtr<Document::MergeOptions> &mergeOptions, const System::ArrayPtr<System::String> &files)
```


| Parameter | Type | Description |
| --- | --- | --- |
| mergeOptions | const System::SharedPtr\<Document::MergeOptions\>\& | The merge options. |
| files | const System::ArrayPtr\<System::String\>\& | The pdf-files to merge. |

## See Also

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [MergeOptions](../mergeoptions/)
* Typedef [ArrayPtr](../../../system/arrayptr/)
* Class [String](../../../system/string/)
* Class [Document](../)
* Namespace [Aspose::Pdf](../../)
* Library [Aspose.PDF for C++](../../../)
