use the PdfiumViewer library and the Image class from the System.Drawing namespace.
This code uses the PdfDocument class from the PdfiumViewer library to load the PDF file, and then it loops through each page and converts it to a Bitmap image using the Render method. Finally, it saves each image as a JPG file using the Save method from the Image class. You can adjust the output file path and image quality as needed.