CadOptionsTiles Property
The coordinates of the drawing regions, that should be rendered.

Namespace: GroupDocs.Viewer.Converter.Options
Assembly: GroupDocs.Viewer (in GroupDocs.Viewer.dll) Version: 19.6
Syntax
public List<Tile> Tiles { get; set; }

Property Value

Type: ListTile
Remarks
Please note, that this option works only for DWG format. When the list is empty, then whole drawing is rendered. When the list contains at least one tile, then ScaleFactor, Width, Height, RenderLayouts and LayoutName properties are ignored.
Examples
The following example demonstrates how to render the bottom left part of the drawing. ///
C#
// Create image handler
ViewerImageHandler imageHandler = new ViewerImageHandler(config);
string guid = "document.dwg";

// Get document width and height
DocumentInfoContainer docInfo = imageHandler.GetDocumentInfo(guid);
int width = docInfo.Pages[0].Width;
int height = docInfo.Pages[0].Height;
// Set tile width and height as a half of whole image 
int tileWidth = width / 2;
int tileHeight = height / 2;

int pointX = 0;
int pointY = 0;
//Create image options to add bottomn left part of the drawing
ImageOptions options = new ImageOptions();
Tile tile = new Tile(pointX, pointY, tileWidth, tileHeight);

// The pages list will contain only one image - the bottom left part of the drawing.
List<PageImage> pages = imageHandler.GetPages(guid, options);

foreach (PageImage page in pages)
{
   Console.WriteLine("Page number: {0}", page.PageNumber); 
   Stream imageContent = page.Stream;
}
See Also