Aspose.Pdf.Kit.PdfExtractor (3.4.0.0) aspose is unable to extract the image from the attached PDF.
The code below works for many other PDF files. The attached file is just one of many like it that do fail. Any reason, explaination, workarounds will be appreciated.
The code:
Dim pdfExtract As New Aspose.Pdf.Kit.PdfExtractor
Dim pdfFileInfo As New Aspose.Pdf.Kit.PdfFileInfo(WorkFN)
If pdfFileInfo.BePdfFile AndAlso Not pdfFileInfo.BeEncrypted Then
pdfFileInfo.ClearInfo()
pdfFileInfo = Nothing
pdfExtract.BindPdf(WorkFN)
pdfExtract.ExtractText()
Dim textData As String = String.Empty
If pdfExtract.HasNextPageText Then
Dim txtStream As New IO.MemoryStream
pdfExtract.GetText(txtStream)
textData = UtilityToolkit.Strings.ByteArrayToString(txtStream.ToArray, True)
End If
pdfExtract.BindPdf(WorkFN)
pdfExtract.ExtractImage()
Dim pdfTifFN As String = System.IO.Path.ChangeExtension(WorkFN, ".tif")
Dim pdfPageFN As String = pdfTifFN.Replace(".tif", "_page.tif")
Dim firstPage As Boolean = True
While pdfExtract.HasNextImage
' doesn't matter what is in the loop, because .HasNextImage returns false
End While