RasterizerProgressing Event

To allow a user to keep track of the Rasterization process, especially for PDFs with many pages, DynamicPDF Rasterizer exposes a RasterizerProgress event. This event is fired for every successfully rasterized page. The following example demonstrates using the RasterizerProgress event.

PdfRasterizer rasterizer = new PdfRasterizer(pdfFilePath);
rasterizer.RasterizerProgress += new ProgressChangedEventHandler(RasterizerProgressing);
rasterizer.Draw(jpegFilePath.jpeg, ImageFormat.Jpeg, ImageSize.Dpi72);
static void RasterizerProgressing(object sender, RasterizerProgressChangedEventArgs e)
     Console.WriteLine(e.PagesCompleted + " pages have been rasterized");
Dim rasterizer As PdfRasterizer = New PdfRasterizer(pdfFilePath)
AddHandler rasterizer.RasterizerProgress, AddressOf RasterizerProgressing
rasterizer.Draw(jpegFilePath.jpeg, ImageFormat.Jpeg, ImageSize.Dpi72)
Sub RasterizerProgressing(ByVal sender As Object, ByVal e As RasterizerProgressChangedEventArgs)
        Console.WriteLine(e.PagesCompleted.ToString() + " pages have been rasterized")
End Sub

In this topic