Aspose.Words.Examples.CSharp.Rendering_and_Printing.RenderShape.RenderCellToImage C# (CSharp) Method

RenderCellToImage() public static method

public static RenderCellToImage ( string dataDir, Document doc ) : void
dataDir string
doc Document
return void
        public static void RenderCellToImage(string dataDir, Document doc)
        {
            // ExStart:RenderCellToImage
            Cell cell = (Cell)doc.GetChild(NodeType.Cell, 2, true); // The third cell in the first table.
            dataDir = dataDir + "TestFile.RenderCell_out.png";
            RenderNode(cell, dataDir, null);
            // ExEnd:RenderCellToImage
            Console.WriteLine("\nCell rendered to image successfully.\nFile saved at " + dataDir);
        }