Aspose::Words::Document::ExtractPages method

Document::ExtractPages method

Returns the Document object representing specified range of pages.

System::SharedPtr<Aspose::Words::Document> Aspose::Words::Document::ExtractPages(int32_t index, int32_t count)
ParameterTypeDescription
indexint32_tThe zero-based index of the first page to extract.
countint32_tNumber of pages to be extracted.

Examples

Shows how to get specified range of pages from the document.

auto doc = MakeObject<Document>(MyDir + u"Layout entities.docx");

doc = doc->ExtractPages(0, 2);

doc->Save(ArtifactsDir + u"Document.ExtractPages.docx");

See Also