Compare commits

...

3 Commits

Author SHA1 Message Date
59105caffc fix(pdf-burner): Korrektur des Versatzes von Siegelbildern für Tintenunterschriften
- Hinzufügen des Parameters „yOffset“ zu „AddImageAnnotation“, um die Position der Siegel anzupassen.
- Aktualisierung von „AddInstantJSONAnnotationToPDF“, um den Versatz für das erste Unterschriftssiegel anzuwenden.
- Stellt sicher, dass Tintenunterschriftssiegel in PDF-Dateien korrekt dargestellt werden, ohne andere Anmerkungen zu beeinträchtigen.
2025-09-05 13:25:25 +02:00
fa8d2f5f62 feat(pdfburner): Berechnung für Anmerkungsindex innerhalb der Signaturgruppe hinzufügen 2025-09-05 11:26:09 +02:00
dbf42e13d9 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
2025-09-05 11:01:36 +02:00

View File

@@ -69,12 +69,19 @@ Namespace Jobs.FinalizeDocument
Try
Dim oAnnotationData = JsonConvert.DeserializeObject(Of AnnotationData)(pInstantJSON)
oAnnotationData.annotations.Reverse()
Dim sigAnnotType = oAnnotationData.annotations.ElementAt(1).type
Dim isSeal = True 'First element is signature seal
Dim formFieldIndex = 0
For Each oAnnotation In oAnnotationData.annotations
Logger.Debug("Adding AnnotationID: " + oAnnotation.id)
Select Case oAnnotation.type
Case ANNOTATION_TYPE_IMAGE
AddImageAnnotation(oAnnotation, oAnnotationData.attachments)
'Add offset to solve the seal position problem in ink signatures
Dim yOffset As Double = If(isSeal And sigAnnotType = ANNOTATION_TYPE_INK, 0.16, 0)
AddImageAnnotation(oAnnotation, oAnnotationData.attachments, yOffset)
Case ANNOTATION_TYPE_INK
AddInkAnnotation(oAnnotation)
@@ -88,6 +95,7 @@ Namespace Jobs.FinalizeDocument
End If
End Select
isSeal = False
Next
Return True
@@ -98,7 +106,7 @@ Namespace Jobs.FinalizeDocument
End Try
End Function
Private Function AddImageAnnotation(pAnnotation As Annotation, pAttachments As Dictionary(Of String, Attachment)) As Boolean
Private Function AddImageAnnotation(pAnnotation As Annotation, pAttachments As Dictionary(Of String, Attachment), Optional yOffset As Double = 0) As Boolean
Try
Dim oAttachment = pAttachments.Where(Function(a) a.Key = pAnnotation.imageAttachmentId).
SingleOrDefault()
@@ -107,7 +115,7 @@ Namespace Jobs.FinalizeDocument
Dim oBounds = pAnnotation.bbox.Select(AddressOf ToInches).ToList()
Dim oX = oBounds.Item(0)
Dim oY = oBounds.Item(1)
Dim oY = oBounds.Item(1) + yOffset
Dim oWidth = oBounds.Item(2)
Dim oHeight = oBounds.Item(3)