refactor(Config): Standardliste IgnoredLabels aktualisieren

This commit is contained in:
Developer 02 2025-03-27 14:01:33 +01:00
parent 7eb8ae6697
commit 88777e0c27
2 changed files with 9 additions and 1 deletions

View File

@ -34,11 +34,13 @@ Namespace Jobs.FinalizeDocument
Try
Using oSourceStream As New MemoryStream(pSourceBuffer)
' Open PDF
oResult = Manager.InitFromStream(oSourceStream)
If oResult <> GdPictureStatus.OK Then
Throw New BurnAnnotationException($"Could not open document for burning: [{oResult}]")
End If
' Add annotation to PDF
For Each oJSON In pInstantJSONList
If AddInstantJSONAnnotationToPDF(oJSON) = False Then
Logger.Warn($"Error in AddInstantJSONAnnotationToPDF - oJson: ")
@ -51,6 +53,7 @@ Namespace Jobs.FinalizeDocument
Throw New BurnAnnotationException($"Could not burn annotations to file: [{oResult}]")
End If
'Save PDF
Using oNewStream As New MemoryStream()
oResult = Manager.SaveDocumentToPDF(oNewStream)
If oResult <> GdPictureStatus.OK Then

View File

@ -7,5 +7,10 @@ Public Class Config
Public Property Debug As Boolean = False
Public Property IntervalInMin As Integer = 1
Public Property IgnoredLabels As List(Of String) = New List(Of String) From {"Date", "Datum", "ZIP", "PLZ", "Place", "Ort"}
Public Property IgnoredLabels As List(Of String) = New List(Of String) From {
"Date", "Datum",
"ZIP", "PLZ",
"Place", "Ort",
"Position", "Stellung"
}
End Class