From c7c78f96a6d9a5500bdfa2d7aaf1f0cf311b4334 Mon Sep 17 00:00:00 2001 From: TekH Date: Thu, 20 Nov 2025 12:34:30 +0100 Subject: [PATCH] refactor(PDFBurner): fix merging errors --- .../Jobs/FinalizeDocument/PDFBurner.vb | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/EnvelopeGenerator.CommonServices/Jobs/FinalizeDocument/PDFBurner.vb b/EnvelopeGenerator.CommonServices/Jobs/FinalizeDocument/PDFBurner.vb index 2a2c8bfe..b3329496 100644 --- a/EnvelopeGenerator.CommonServices/Jobs/FinalizeDocument/PDFBurner.vb +++ b/EnvelopeGenerator.CommonServices/Jobs/FinalizeDocument/PDFBurner.vb @@ -160,8 +160,19 @@ Namespace Jobs.FinalizeDocument #End Region #Region "Add Value" - Exit Select - Case AnnotationType.Ink + Private Sub AddInstantJSONAnnotationToPDF(pInstantJSON As String) + Dim oAnnotationData = JsonConvert.DeserializeObject(Of AnnotationData)(pInstantJSON) + + oAnnotationData.annotations.Reverse() + + For Each oAnnotation In oAnnotationData.annotations + Logger.Debug("Adding AnnotationID: " + oAnnotation.id) + + Select Case oAnnotation.type + Case AnnotationType.Image + AddImageAnnotation(oAnnotation, oAnnotationData.attachments) + Exit Select + Case AnnotationType.Ink AddInkAnnotation(oAnnotation) Exit Select Case AnnotationType.Widget @@ -261,7 +272,7 @@ Namespace Jobs.FinalizeDocument ant.FontSize = _pdfBurnerParams.FontSize ant.FontStyle = _pdfBurnerParams.FontStyle Manager.SaveAnnotationsToPage() - End Sub + End Sub #End Region #Region "Helpers"