refactor(PDFBurner): extract instant JSON annotation burning logic into separate method

- Moved annotation burning logic from `BurnAnnotsToPDF` into new method `BurnInstantJSONAnnotsToPDF`
- Simplified `BurnAnnotsToPDF` to handle only background generation and call the new method
- Improved code readability and separation of concerns
This commit is contained in:
tekh 2025-10-23 17:05:37 +02:00
parent 7912469709
commit 02a7b706cf

View File

@ -49,6 +49,10 @@ Namespace Jobs.FinalizeDocument
pSourceBuffer = doc.Background(elements).ExportStream().ToArray() pSourceBuffer = doc.Background(elements).ExportStream().ToArray()
End Using End Using
Return BurnInstantJSONAnnotsToPDF(pSourceBuffer, pInstantJSONList)
End Function
Public Function BurnInstantJSONAnnotsToPDF(pSourceBuffer As Byte(), pInstantJSONList As List(Of String)) As Byte()
Dim oResult As GdPictureStatus Dim oResult As GdPictureStatus
Using oSourceStream As New MemoryStream(pSourceBuffer) Using oSourceStream As New MemoryStream(pSourceBuffer)
' Open PDF ' Open PDF