## XpsDocument::InsertDocument(int32_t, bool) method


Inserts an empty document with default page size at *index*  position.

```cpp
void Aspose::Page::XPS::XpsDocument::InsertDocument(int32_t index, bool activate=true)
```


| Parameter | Type | Description |
| --- | --- | --- |
| index | int32_t | Position at which a document should be inserted. |
| activate | bool | Flag indicating whether to select inserted document as active. |

## See Also

* Class [XpsDocument](../)
* Namespace [Aspose::Page::XPS](../../)
* Library [Aspose.Page for C++](../../../)
## XpsDocument::InsertDocument(int32_t, float, float, bool) method


Inserts an empty document with the first page dimensions *width*  and *height*  at *index*  position.

```cpp
void Aspose::Page::XPS::XpsDocument::InsertDocument(int32_t index, float width, float height, bool activate=true)
```


| Parameter | Type | Description |
| --- | --- | --- |
| index | int32_t | Position at which a document should be inserted. |
| width | float | Width of the first page. |
| height | float | Height of the first page. |
| activate | bool | Flag indicating whether to select inserted document as active. |

## See Also

* Class [XpsDocument](../)
* Namespace [Aspose::Page::XPS](../../)
* Library [Aspose.Page for C++](../../../)
