Конвертировать PDF в изображения с высоким качеством в WPF с помощью шпиля.формат PDF
Hi i'm using spire.pdf for .net to convert my pdf document to image with wpf but i faced one problem when converting pdf document to bitmapsource image the c# error is " can't implicitly convert system.drawing.imaging to system.windows.media.bitmapsource "
мой код таков
private void button1_Click(object sender, RoutedEventArgs e)
{
PdfDocument pdf = new PdfDocument();
pdf.LoadFromFile("sample.pdf");
BitmapSource source;
Bitmap bmp;
for (int i = 1; i < pdf.Pages.Count+1; i++)
{
source = pdf.SaveAsImage(i);
bmp = SourceToBitmap(source);
bmp.Save(string.Format("result-{0}.jpeg", i), ImageFormat.Jpeg);
}
}
<pre lang="text"> error in the line of " source = pdf.saveasimage(i); " please help me how to solve this problem