Interfaces/ZUGFeRD: check if any extension exists

This commit is contained in:
Jonathan Jenne 2024-01-15 09:17:50 +01:00
parent 4a2b64f73d
commit 9f11b2b7bc

View File

@ -165,7 +165,14 @@ Public Class PDFEmbeds
If GDPicturePDF.GetStat() = GdPictureStatus.OK Then If GDPicturePDF.GetStat() = GdPictureStatus.OK Then
Logger.Debug("Extracting embedded file [{0}]", oFileName) Logger.Debug("Extracting embedded file [{0}]", oFileName)
Dim oExtension = New FileInfo(oFileName).Extension.ToUpper.Substring(1) Dim oFileInfo = New FileInfo(oFileName)
Dim oExtension As String = oFileInfo.Extension
If String.IsNullOrWhiteSpace(oExtension) Then
Logger.Error("The embedded file [{0}] does not have any extension. Skipping.")
Continue For
End If
If pExtensions.Contains(oExtension) Then If pExtensions.Contains(oExtension) Then
Dim oFileSize As Integer = GDPicturePDF.GetEmbeddedFileSize(oIndex) Dim oFileSize As Integer = GDPicturePDF.GetEmbeddedFileSize(oIndex)