The following code snippet shows how to rotate output pages when rendering a document as PDF:
usingGroupDocs.Viewer;usingGroupDocs.Viewer.Options;// ...using(Viewerviewer=newViewer("sample.docx")){// Create a PDF file.PdfViewOptionsviewOptions=newPdfViewOptions();// Rotate the first page.viewOptions.RotatePage(1,Rotation.On90Degree);viewer.View(viewOptions);}
ImportsGroupDocs.ViewerImportsGroupDocs.Viewer.Options' ...
ModuleProgramSubMain(argsAsString())UsingviewerAsViewer=NewViewer("sample.docx")' Create a PDF file.
DimviewOptionsAsPdfViewOptions=NewPdfViewOptions()' Rotate the first page.
viewOptions.RotatePage(1,Rotation.On90Degree)viewer.View(viewOptions)EndUsingEndSubEndModule
You can also view the example in our public GitHub repository .
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.