refactor(pdf-burner): organize code with regions for better readability

- Grouped related methods and classes into logical #Region blocks:
  - "Burn PDF"
  - "Add Value"
  - "Helpers"
  - "Model"
- Improved code structure and readability without changing functionality.
- No logic or behavior modifications were made.
This commit is contained in:
tekh 2025-10-24 12:30:16 +02:00
parent a845b85a5c
commit 258de6244c

View File

@ -36,6 +36,7 @@ Namespace Jobs.FinalizeDocument
_pdfBurnerParams = pdfBurnerParams
End Sub
#Region "Burn PDF"
Public Function BurnAnnotsToPDF(pSourceBuffer As Byte(), pInstantJSONList As List(Of String), envelopeId As Integer) As Byte()
'read the elements of envelope with their annotations
Dim sigRepo = Factory.Shared.Repository(Of Signature)()
@ -93,7 +94,9 @@ Namespace Jobs.FinalizeDocument
End Using
End Using
End Function
#End Region
#Region "Add Value"
Private Sub AddInstantJSONAnnotationToPDF(pInstantJSON As String)
Dim oAnnotationData = JsonConvert.DeserializeObject(Of AnnotationData)(pInstantJSON)
@ -175,7 +178,9 @@ Namespace Jobs.FinalizeDocument
ant.FontStyle = _pdfBurnerParams.FontStyle
Manager.SaveAnnotationsToPage()
End Sub
#End Region
#Region "Helpers"
Private Function ToPointF(pPoints As List(Of Single)) As PointF
Dim oPoints = pPoints.Select(AddressOf ToInches).ToList()
Return New PointF(oPoints.Item(0), oPoints.Item(1))
@ -188,7 +193,9 @@ Namespace Jobs.FinalizeDocument
Private Function ToInches(pValue As Single) As Single
Return pValue / 72
End Function
#End Region
#Region "Model"
Friend Class AnnotationData
Public Property annotations As List(Of Annotation)
@ -318,5 +325,6 @@ Namespace Jobs.FinalizeDocument
Public Property name As String
Public Property value As String
End Class
#End Region
End Class
End Namespace