## XpsDocument::AddPage(bool) method


Adds an empty page to the document with default page size.

```cpp
System::SharedPtr<XpsModel::XpsPage> Aspose::Page::XPS::XpsDocument::AddPage(bool activate=true)
```


| Parameter | Type | Description |
| --- | --- | --- |
| activate | bool | Flag indicating whether to select added page as active. |

### ReturnValue

Added page.

## See Also

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [XpsPage](../../../aspose.page.xps.xpsmodel/xpspage/)
* Class [XpsDocument](../)
* Namespace [Aspose::Page::XPS](../../)
* Library [Aspose.Page for C++](../../../)
## XpsDocument::AddPage(float, float, bool) method


Adds an empty page to the document with specified *width*  and *height* .

```cpp
System::SharedPtr<XpsModel::XpsPage> Aspose::Page::XPS::XpsDocument::AddPage(float width, float height, bool activate=true)
```


| Parameter | Type | Description |
| --- | --- | --- |
| width | float | Width of a new page. |
| height | float | Height of a new page. |
| activate | bool | Flag indicating whether to select added page as active. |

### ReturnValue

Added page.

## See Also

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [XpsPage](../../../aspose.page.xps.xpsmodel/xpspage/)
* Class [XpsDocument](../)
* Namespace [Aspose::Page::XPS](../../)
* Library [Aspose.Page for C++](../../../)
## XpsDocument::AddPage(System::SharedPtr\<XpsModel::XpsPage\>, bool) method


Adds a page to the document.

```cpp
System::SharedPtr<XpsModel::XpsPage> Aspose::Page::XPS::XpsDocument::AddPage(System::SharedPtr<XpsModel::XpsPage> page, bool activate=true)
```


| Parameter | Type | Description |
| --- | --- | --- |
| page | System::SharedPtr\<XpsModel::XpsPage\> | [Page](../../../aspose.page/) to be added. |
| activate | bool | Flag indicating whether to select added page as active. |

### ReturnValue

Added page.

## See Also

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [XpsPage](../../../aspose.page.xps.xpsmodel/xpspage/)
* Class [XpsDocument](../)
* Namespace [Aspose::Page::XPS](../../)
* Library [Aspose.Page for C++](../../../)
