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