refactor: add AddImageAnnotation-method
This commit is contained in:
parent
fee256a51a
commit
7f9125b3aa
@ -62,6 +62,8 @@ Namespace Jobs.FinalizeDocument
|
|||||||
For Each annot In element.Annotations
|
For Each annot In element.Annotations
|
||||||
If annot.Type = AnnotationType.FormField Then
|
If annot.Type = AnnotationType.FormField Then
|
||||||
AddFormFieldValue(annot.Name, x, y, 100, 180, element.Page, annot.Value)
|
AddFormFieldValue(annot.Name, x, y, 100, 180, element.Page, annot.Value)
|
||||||
|
ElseIf annot.Type = AnnotationType.FormField Then
|
||||||
|
AddImageAnnotation(x, y, 100, 180, element.Page, annot.Value)
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
Next
|
Next
|
||||||
@ -135,6 +137,11 @@ Namespace Jobs.FinalizeDocument
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub AddImageAnnotation(x As Double, y As Double, width As Double, height As Double, page As Integer, base64 As String)
|
||||||
|
Manager.SelectPage(page + 1)
|
||||||
|
Manager.AddEmbeddedImageAnnotFromBase64(base64, x, y, width, height)
|
||||||
|
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))
|
||||||
Dim oAttachment = pAttachments.Where(Function(a) a.Key = pAnnotation.imageAttachmentId).
|
Dim oAttachment = pAttachments.Where(Function(a) a.Key = pAnnotation.imageAttachmentId).
|
||||||
SingleOrDefault()
|
SingleOrDefault()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user