Responsive design aims to make web pages render well on a variety of devices. GroupDocs.Viewer provides the RenderResponsive property of the HtmlViewOptions class to render HTML pages with responsive layout.
The following code snippet shows how to render a .docx document to HTML with responsive layout:
usingGroupDocs.Viewer;usingGroupDocs.Viewer.Options;// ...using(Viewerviewer=newViewer("sample.docx")){// Create view options.varviewOptions=HtmlViewOptions.ForEmbeddedResources();// Render the file with responsive layout.viewOptions.RenderResponsive=true;viewer.View(viewOptions);}
ImportsGroupDocs.ViewerImportsGroupDocs.Viewer.Options' ...
ModuleProgramSubMain(argsAsString())UsingviewerAsViewer=NewViewer("sample.docx")' Create view options.
DimviewOptions=HtmlViewOptions.ForEmbeddedResources()' Render the file with responsive layout.
viewOptions.RenderResponsive=Trueviewer.View(viewOptions)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.