using last version of spire office 8.9.3
file will send by email
getting error from that code
System.StackOverflowException
HResult=0x800703E9
Message=Exception of type 'System.StackOverflowException' was thrown.
PdfDocument PDF = new PdfDocument(File.ReadAllBytes("D:\\KD Invoices - 10.12.2023 (1).pdf"));
Image image = PDF.SaveAsImage(13, PdfImageType.Bitmap);