feat(pdfburner): Berechnung des Signaturindexes bei der Anmerkungsverarbeitung hinzugefügt

- Variablen `annotCountPerSign`, `annotIndex` und `calcSignIndex` eingeführt
- Berechnung von `signIndex` während der Anmerkungsiteration hinzugefügt
- Bestehende Logik für Bild-, Tinten- und Widget-Anmerkungen beibehalten
This commit is contained in:
2025-09-05 11:01:36 +02:00
parent e48a86e21c
commit dbf42e13d9

View File

@@ -69,9 +69,17 @@ Namespace Jobs.FinalizeDocument
Try
Dim oAnnotationData = JsonConvert.DeserializeObject(Of AnnotationData)(pInstantJSON)
oAnnotationData.annotations.Reverse()
Dim annotCountPerSign = 5
Dim annotIndex = 1
Dim calcSignIndex = Function() CInt(Math.Ceiling(CDbl(annotIndex) / CDbl(annotCountPerSign)))
Dim formFieldIndex = 0
For Each oAnnotation In oAnnotationData.annotations
Logger.Debug("Adding AnnotationID: " + oAnnotation.id)
Dim signIndex = calcSignIndex()
Select Case oAnnotation.type
Case ANNOTATION_TYPE_IMAGE
AddImageAnnotation(oAnnotation, oAnnotationData.attachments)
@@ -88,6 +96,7 @@ Namespace Jobs.FinalizeDocument
End If
End Select
annotIndex += 1
Next
Return True