From dbf42e13d9b3147638ba3c56ee734517108ecc9a Mon Sep 17 00:00:00 2001 From: TekH Date: Fri, 5 Sep 2025 11:01:36 +0200 Subject: [PATCH] =?UTF-8?q?feat(pdfburner):=20Berechnung=20des=20Signaturi?= =?UTF-8?q?ndexes=20bei=20der=20Anmerkungsverarbeitung=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- .../Jobs/FinalizeDocument/PDFBurner.vb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/EnvelopeGenerator.CommonServices/Jobs/FinalizeDocument/PDFBurner.vb b/EnvelopeGenerator.CommonServices/Jobs/FinalizeDocument/PDFBurner.vb index 99cd34f1..413a73d7 100644 --- a/EnvelopeGenerator.CommonServices/Jobs/FinalizeDocument/PDFBurner.vb +++ b/EnvelopeGenerator.CommonServices/Jobs/FinalizeDocument/PDFBurner.vb @@ -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