This code worked since one year, but now with that file, it crash:
- Code: Select all
Dim ret As Image = Nothing
Try
If IO.File.Exists(fileName) Then
Dim doc As New Spire.Pdf.PdfDocument()
doc.LoadFromFile(fileName)
If doc.Pages.Count > 0 Then
Using img As Image = doc.SaveAsImage(0, Spire.Pdf.Graphics.PdfImageType.Bitmap, 100, 100)
ret = img.Clone()
End Using
End If
doc.Close()
End If
Catch ex As Exception
Throw ex
End Try
Return ret