refactor(Config): Standardliste IgnoredLabels aktualisieren
This commit is contained in:
parent
7eb8ae6697
commit
88777e0c27
@ -34,11 +34,13 @@ Namespace Jobs.FinalizeDocument
|
|||||||
|
|
||||||
Try
|
Try
|
||||||
Using oSourceStream As New MemoryStream(pSourceBuffer)
|
Using oSourceStream As New MemoryStream(pSourceBuffer)
|
||||||
|
' Open PDF
|
||||||
oResult = Manager.InitFromStream(oSourceStream)
|
oResult = Manager.InitFromStream(oSourceStream)
|
||||||
If oResult <> GdPictureStatus.OK Then
|
If oResult <> GdPictureStatus.OK Then
|
||||||
Throw New BurnAnnotationException($"Could not open document for burning: [{oResult}]")
|
Throw New BurnAnnotationException($"Could not open document for burning: [{oResult}]")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
' Add annotation to PDF
|
||||||
For Each oJSON In pInstantJSONList
|
For Each oJSON In pInstantJSONList
|
||||||
If AddInstantJSONAnnotationToPDF(oJSON) = False Then
|
If AddInstantJSONAnnotationToPDF(oJSON) = False Then
|
||||||
Logger.Warn($"Error in AddInstantJSONAnnotationToPDF - oJson: ")
|
Logger.Warn($"Error in AddInstantJSONAnnotationToPDF - oJson: ")
|
||||||
@ -51,6 +53,7 @@ Namespace Jobs.FinalizeDocument
|
|||||||
Throw New BurnAnnotationException($"Could not burn annotations to file: [{oResult}]")
|
Throw New BurnAnnotationException($"Could not burn annotations to file: [{oResult}]")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'Save PDF
|
||||||
Using oNewStream As New MemoryStream()
|
Using oNewStream As New MemoryStream()
|
||||||
oResult = Manager.SaveDocumentToPDF(oNewStream)
|
oResult = Manager.SaveDocumentToPDF(oNewStream)
|
||||||
If oResult <> GdPictureStatus.OK Then
|
If oResult <> GdPictureStatus.OK Then
|
||||||
|
|||||||
@ -7,5 +7,10 @@ Public Class Config
|
|||||||
Public Property Debug As Boolean = False
|
Public Property Debug As Boolean = False
|
||||||
Public Property IntervalInMin As Integer = 1
|
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
|
End Class
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user