renderTargetBitmap error : ‘Value does not fall within the expected range.’
I have a method SetImagePDF in my application that is supposed to render a Grid into a RenderTargetBitmap and convert it into an iText Image for PDF generation. However, I’m encountering an error at the line await renderTargetBitmap.RenderAsync(Page, (int)(scaledWidth), (int)(scaledHeight)); which throws an exception: ‘Value does not fall within the expected range.’