DocViewer isnothing

This commit is contained in:
Developer01
2025-12-01 16:37:27 +01:00
parent 07332a4990
commit 4085d05368
3 changed files with 51 additions and 11 deletions

View File

@@ -159,9 +159,41 @@ Public Class Form1
If oResult = DialogResult.OK Then
Try
Dim oDoc = _zugferd.ValidateZUGFeRDFileWithGDPicture(OpenFileDialog1.FileName)
Dim oDoc = _zugferd.ValidateZUGFeRDFileWithGDPicture(OpenFileDialog1.FileName, True)
Dim oZFResult = _zugferd.ValidateZUGFeRDDocument(oDoc)
Dim oZUGFERD = _zugferd.SerializeZUGFeRDDocument(oDoc)
Console.WriteLine()
WriteLog("Specification: " & oZFResult.Specification)
'WriteLog("XML-Schema: " & oResult.UsedXMLSchema)
WriteLog("Embedded File Name: " & oZFResult.DataFileName)
Dim oSpecification = oZFResult.Specification
If oSpecification = ZUGFeRDInterface.ZUGFERD_SPEC_10 Then
oSpecification = ZUGFeRDInterface.ZUGFERD_SPEC_DEFAULT
End If
Dim oPropertyMap = oArgs.PropertyMapList.
Where(Function(kv) kv.Specification = oSpecification).
ToDictionary(Function(kv) kv.XMLPath, Function(kv) kv)
Dim oResult2 = _zugferd.PropertyValues.CheckPropertyValues(oZFResult.SchemaObject, oPropertyMap, "test")
WriteLog("Valid Properties: [{0}]", oResult2.ValidProperties.Count)
For Each Prop In oResult2.ValidProperties
If Prop.Value.Length > 250 Then
WriteLog("Property: [{0}] = [{1}]", Prop.Description, Prop.Value.Substring(0, 250))
Else
WriteLog("Property: [{0}] = [{1}]", Prop.Description, Prop.Value)
End If
Next
WriteLog("--------------------------------")
WriteLog("Missing Properties: [{0}]", oResult2.MissingProperties.Count)
For Each Prop In oResult2.MissingProperties
WriteLog("Missing Property: [{0}]", Prop.ToString) ''Prop.Description
Next
WriteLog("--------------------------------")
Catch ex As DigitalData.Modules.Interfaces.Exceptions.ZUGFeRDExecption
Dim oErrorCode = GetRejectionCodeNumber(ex.ErrorCode)
Dim oMessage = oErrorCode + " - (" + ex.ErrorCode.ToString() + ") - " + ex.Message
@@ -169,6 +201,7 @@ Public Class Form1
Catch ex As Exception
MsgBox(ex.Message)
End Try
MsgBox("Finished - check log")
End If
End Sub
@@ -227,7 +260,7 @@ Public Class Form1
Try
If oDialogResult = DialogResult.OK Then
Dim oDoc = _zugferd.ValidateZUGFeRDFileWithGDPicture(OpenFileDialog1.FileName)
Dim oDoc = _zugferd.ValidateZUGFeRDFileWithGDPicture(OpenFileDialog1.FileName, True)
Dim oResult = _zugferd.ValidateZUGFeRDDocument(oDoc)
oResult = _zugferd.SerializeZUGFeRDDocument(oDoc)