Interfaces: More logging for PDFEmbeds.Extract
This commit is contained in:
parent
9004b3db88
commit
33b83a1f6c
@ -25,10 +25,22 @@ Public Class PDFEmbeds
|
||||
''' <param name="AllowedExtensions">List of allowed extensions to be extracted</param>
|
||||
Public Function Extract(FilePath As String, AllowedExtensions As List(Of String)) As List(Of EmbeddedFile)
|
||||
Dim oFile As New List(Of EmbeddedFile)
|
||||
Dim oFileInfo As FileInfo
|
||||
Dim oExtensions = AllowedExtensions.ConvertAll(New Converter(Of String, String)(Function(ext) ext.ToUpper))
|
||||
|
||||
Logger.Debug("Extracting embedded files from [{0}]", FilePath)
|
||||
|
||||
Try
|
||||
oFileInfo = New FileInfo(FilePath)
|
||||
|
||||
Logger.Debug("Filename: {0}", oFileInfo.Name)
|
||||
Logger.Debug("Filesize: {0}", oFileInfo.Length)
|
||||
Logger.Debug("Exists: {0}", oFileInfo.Exists)
|
||||
Catch ex As Exception
|
||||
Logger.Warn("File information for [{0}] could not be read!", FilePath)
|
||||
Logger.Error(ex)
|
||||
End Try
|
||||
|
||||
Try
|
||||
Using oGDPicturePDF As New GdPicturePDF()
|
||||
If oGDPicturePDF.LoadFromFile(FilePath, False) = GdPictureStatus.OK Then
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user