Responsive design aims to make web pages render well on a variety of devices. GroupDocs.Viewer provides the setRenderResponsive() method 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:
importcom.groupdocs.viewer.Viewer;importcom.groupdocs.viewer.options.HtmlViewOptions;// ...
try(Viewerviewer=newViewer("sample.docx")){HtmlViewOptionsviewOptions=HtmlViewOptions.forEmbeddedResources();// Render with responsive layout.
viewOptions.setRenderResponsive(true);viewer.view(viewOptions);}
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.