Aspose.Words.Examples.CSharp.Rendering_and_Printing.LayoutInfoWriter.Run C# (CSharp) Method

Run() public static method

public static Run ( LayoutEnumerator it ) : void
it LayoutEnumerator
return void
        public static void Run(LayoutEnumerator it)
        {
            DisplayLayoutElements(it, string.Empty);
        }

Usage Example

コード例 #1
0
        public static void Run()
        {
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_RenderingAndPrinting();

            Document doc = new Document(dataDir + "TestFile.EnumerateLayout.docx");

            // This creates an enumerator which is used to "walk" the elements of a rendered document.
            LayoutEnumerator it = new LayoutEnumerator(doc);

            // This sample uses the enumerator to write information about each layout element to the console.
            LayoutInfoWriter.Run(it);

            // This sample adds a border around each layout element and saves each page as a JPEG image to the data directory.
            OutlineLayoutEntitiesRenderer.Run(doc, it, dataDir);

            Console.WriteLine("\nEnumerate layout elements example ran successfully.");
        }