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