Beispiel #1
0
        private async static void PRender_OnPDFLoaded(object sender, EventArgs eventArgs)
        {
            Console.WriteLine("PDF Loaded!");

            Console.WriteLine("Getting text on pages...");
            for (int i = 0; i < pRender.PageCount; i++)
            {
                var text = await pRender.GetTextAsync(i);

                Console.WriteLine("Page " + (i + 1));
            }

            Console.WriteLine("Getting detailed text contents...");
            for (int i = 0; i < pRender.PageCount; i++)
            {
                var contents = await pRender.GetTextContentAsync(i);

                Console.WriteLine("Page " + (i + 1));
            }

            Console.WriteLine("Getting page images...");
            for (int i = 0; i < pRender.PageCount; i++)
            {
                (await pRender.RenderPageAsync(i, 1)).Save("capture_" + (i + 1) + ".png");
            }
        }