Render all layouts

When GroupDocs.Viewer renders CAD drawings we get only Model representation. In order to render Model and all non-empty Layouts within CAD drawing, the property CadOptions.RenderLayouts of HtmlViewOptions class (or PngViewOptions, or JpgViewOptions, or PdfViewOptions) is used.

Following are the steps to render all the non-empty layouts along with the Model.

The following code sample shows how to render layouts along with the Model of a CAD drawing.

    try (Viewer viewer = new Viewer("sample.dwg")) {
        HtmlViewOptions viewOptions = HtmlViewOptions.forEmbeddedResources();

More resources

GitHub Examples

You may easily run the code above and see the feature in action in our GitHub examples:

Free Online App

Along with full-featured Java library we provide simple but powerful free Apps. You are welcome to view Word, PDF, Excel, PowerPoint documents with free to use online GroupDocs Viewer App.