From 02a7b706cfc299be326587977ba6da79817aae00 Mon Sep 17 00:00:00 2001 From: TekH Date: Thu, 23 Oct 2025 17:05:37 +0200 Subject: [PATCH] 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 --- .../Jobs/FinalizeDocument/PDFBurner.vb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/EnvelopeGenerator.CommonServices/Jobs/FinalizeDocument/PDFBurner.vb b/EnvelopeGenerator.CommonServices/Jobs/FinalizeDocument/PDFBurner.vb index ecee23e8..6a3d1aca 100644 --- a/EnvelopeGenerator.CommonServices/Jobs/FinalizeDocument/PDFBurner.vb +++ b/EnvelopeGenerator.CommonServices/Jobs/FinalizeDocument/PDFBurner.vb @@ -49,6 +49,10 @@ Namespace Jobs.FinalizeDocument pSourceBuffer = 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() Dim oResult As GdPictureStatus Using oSourceStream As New MemoryStream(pSourceBuffer) ' Open PDF