fix(pdf-burner): correct image annotation type and scaling
- Fixed conditional check in BurnElementAnnotsToPDF to correctly handle AnnotationType.Image. - Adjusted AddImageAnnotation method to scale width and height by dividing by 100. - No functional changes to other PDF burning or annotation logic.
This commit is contained in:
@@ -83,7 +83,7 @@ Namespace Jobs.FinalizeDocument
|
|||||||
|
|
||||||
If annot.Type = AnnotationType.FormField Then
|
If annot.Type = AnnotationType.FormField Then
|
||||||
AddFormFieldValue(x, y, width, height, element.Page, annot.Value)
|
AddFormFieldValue(x, y, width, height, element.Page, annot.Value)
|
||||||
ElseIf annot.Type = AnnotationType.FormField Then
|
ElseIf annot.Type = AnnotationType.Image Then
|
||||||
AddImageAnnotation(x, y, width, height, element.Page, annot.Value)
|
AddImageAnnotation(x, y, width, height, element.Page, annot.Value)
|
||||||
ElseIf annot.Type = AnnotationType.Ink Then
|
ElseIf annot.Type = AnnotationType.Ink Then
|
||||||
AddInkAnnotation(element.Page, annot.Value)
|
AddInkAnnotation(element.Page, annot.Value)
|
||||||
@@ -175,7 +175,7 @@ Namespace Jobs.FinalizeDocument
|
|||||||
|
|
||||||
Private Sub AddImageAnnotation(x As Double, y As Double, width As Double, height As Double, page As Integer, base64 As String)
|
Private Sub AddImageAnnotation(x As Double, y As Double, width As Double, height As Double, page As Integer, base64 As String)
|
||||||
Manager.SelectPage(page)
|
Manager.SelectPage(page)
|
||||||
Manager.AddEmbeddedImageAnnotFromBase64(base64, x, y, width, height)
|
Manager.AddEmbeddedImageAnnotFromBase64(base64, x, y, width / 100, height / 100)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub AddImageAnnotation(pAnnotation As Annotation, pAttachments As Dictionary(Of String, Attachment))
|
Private Sub AddImageAnnotation(pAnnotation As Annotation, pAttachments As Dictionary(Of String, Attachment))
|
||||||
|
|||||||
Reference in New Issue
Block a user