Call the View method of the Viewer object. Specify the new page order in the last parameters.
The following code snippet shows how to reorder pages:
usingGroupDocs.Viewer.Options;usingGroupDocs.Viewer;// ...using(Viewerviewer=newViewer("sample.docx")){// Create view options.PdfViewOptionsviewOptions=newPdfViewOptions();// Pass page numbers in the order you want to render them. viewer.View(viewOptions,2,1);}
ImportsGroupDocs.Viewer.OptionsImportsGroupDocs.Viewer' ...
ModuleProgramSubMain(argsAsString())UsingviewerAsViewer=NewViewer("sample.docx")' Create view options.
DimviewOptionsAsPdfViewOptions=NewPdfViewOptions()' Pass page numbers in the order you want to render them.
viewer.View(viewOptions,2,1)EndUsingEndSubEndModule
sample.docx is the sample file used in this example. Click here to download it.