Call the View method. Specify the page numbers array as the second parameter.
The following code snippet shows how to render the 1st, 2nd, and 4th pages of a document:
usingGroupDocs.Viewer;usingGroupDocs.Viewer.Options;// ...// Create an array and specify page numbers.int[]pageNumbers=newint[]{1,2,4};using(Viewerviewer=newViewer("sample.docx")){// Create view options.varviewOptions=HtmlViewOptions.ForEmbeddedResources();// Use array to render specific pages.viewer.View(viewOptions,pageNumbers);}
ImportsGroupDocs.ViewerImportsGroupDocs.Viewer.Options' ...
ModuleProgramSubMain(argsAsString())' Create an array and specify page numbers.
DimpageNumbers=NewInteger(){1,2,4}UsingviewerAsViewer=NewViewer("sample.docx")' Create view options.
DimviewOptions=HtmlViewOptions.ForEmbeddedResources()' Use array to render specific pages.
viewer.View(viewOptions,pageNumbers)EndUsingEndSubEndModule
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.