Render N consecutive pages
Leave feedback
GroupDocs.Viewer provides the feature to render N consecutive pages. Follow the below steps to render N consecutive pages.
- Instantiate the Viewer object;
- Instantiate the HtmlViewOptions (or JpgViewOptions, or PngViewOptions, or PdfViewOptions) object;
- Pass page numbers array to View method.
The following code sample shows how to render N consecutive pages of a document.
int[] pageNumbers = new int[] { 1, 2, 3 };
using (Viewer viewer = new Viewer("sample.docx"))
{
HtmlViewOptions viewOptions = HtmlViewOptions.ForEmbeddedResources();
viewer.View(viewOptions, pageNumbers);
}
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.