fix(pdfburner): correct y-position adjustment for signature seal annotations
Previously, image annotations for signature seals used a static yOffset when combined with ink annotations, which caused positioning issues. This change calculates the y-position of the signature annotation relative to the next annotation and applies it only for the first seal. - Added `yPosOfSigAnnot` calculation for precise vertical placement. - Updated `AddInstantJSONAnnotationToPDF` to overwrite bbox.y for seals. - Removed hardcoded ink offset logic.
This commit is contained in:
parent
b2bfc11713
commit
6691471276
@ -71,6 +71,7 @@ Namespace Jobs.FinalizeDocument
|
|||||||
oAnnotationData.annotations.Reverse()
|
oAnnotationData.annotations.Reverse()
|
||||||
|
|
||||||
Dim sigAnnotType = oAnnotationData.annotations.ElementAt(1).type
|
Dim sigAnnotType = oAnnotationData.annotations.ElementAt(1).type
|
||||||
|
Dim yPosOfSigAnnot = oAnnotationData.annotations.ElementAt(2).bbox.ElementAt(1) - 71.84002685546875 + 7
|
||||||
Dim isSeal = True 'First element is signature seal
|
Dim isSeal = True 'First element is signature seal
|
||||||
|
|
||||||
Dim formFieldIndex = 0
|
Dim formFieldIndex = 0
|
||||||
@ -79,9 +80,12 @@ Namespace Jobs.FinalizeDocument
|
|||||||
|
|
||||||
Select Case oAnnotation.type
|
Select Case oAnnotation.type
|
||||||
Case ANNOTATION_TYPE_IMAGE
|
Case ANNOTATION_TYPE_IMAGE
|
||||||
'Add offset to solve the seal position problem in ink signatures
|
|
||||||
Dim yOffset As Double = If(isSeal And sigAnnotType = ANNOTATION_TYPE_INK, 0.07, 0)
|
If (isSeal) Then
|
||||||
AddImageAnnotation(oAnnotation, oAnnotationData.attachments, yOffset)
|
oAnnotation.bbox.Item(1) = yPosOfSigAnnot
|
||||||
|
End If
|
||||||
|
|
||||||
|
AddImageAnnotation(oAnnotation, oAnnotationData.attachments)
|
||||||
|
|
||||||
Case ANNOTATION_TYPE_INK
|
Case ANNOTATION_TYPE_INK
|
||||||
AddInkAnnotation(oAnnotation)
|
AddInkAnnotation(oAnnotation)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user