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


在 *index* 位置插入一个具有默认页面尺寸的空文档。

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


| Parameter | Type | 描述 |
| --- | --- | --- |
| 索引 | int32_t | 应插入文档的位置。 |
| 激活 | bool | 标志，指示是否将插入的文档设为活动状态。 |

## 另见

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


在 *index* 位置插入一个空文档，其首页尺寸为 *width* 和 *height*。

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


| Parameter | Type | 描述 |
| --- | --- | --- |
| 索引 | int32_t | 应插入文档的位置。 |
| width | 单精度浮点数 | 第一页的宽度。 |
| height | 单精度浮点数 | 第一页的高度。 |
| 激活 | bool | 标志，指示是否将插入的文档设为活动状态。 |

## 另见

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