refactor(PDFBurner): separate element annotation burning into dedicated method and simplify BurnAnnotsToPDF logic
This commit is contained in:
parent
02a7b706cf
commit
a845b85a5c
@ -44,12 +44,16 @@ Namespace Jobs.FinalizeDocument
|
||||
.Include(Function(sig) sig.Annotations) _
|
||||
.ToList()
|
||||
|
||||
Return If(elements.Any(),
|
||||
BurnElementAnnotsToPDF(pSourceBuffer, elements),
|
||||
BurnInstantJSONAnnotsToPDF(pSourceBuffer, pInstantJSONList))
|
||||
End Function
|
||||
|
||||
Public Function BurnElementAnnotsToPDF(pSourceBuffer As Byte(), elements As List(Of Signature)) As Byte()
|
||||
' Add background
|
||||
Using doc As Pdf(Of MemoryStream, MemoryStream) = Pdf.FromMemory(pSourceBuffer)
|
||||
pSourceBuffer = doc.Background(elements).ExportStream().ToArray()
|
||||
Return doc.Background(elements).ExportStream().ToArray()
|
||||
End Using
|
||||
|
||||
Return BurnInstantJSONAnnotsToPDF(pSourceBuffer, pInstantJSONList)
|
||||
End Function
|
||||
|
||||
Public Function BurnInstantJSONAnnotsToPDF(pSourceBuffer As Byte(), pInstantJSONList As List(Of String)) As Byte()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user