This commit is contained in:
2024-06-26 11:37:58 +02:00
parent 27a5538229
commit 8950482bac
9 changed files with 149 additions and 47 deletions

View File

@@ -48,19 +48,25 @@ Public Class frmFinalizePDF
End Function
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim oDocumentPath = LoadEnvelopeDocument()
Dim oFileInfo = New FileInfo(oDocumentPath)
Dim oTable = LoadAnnotationDataForEnvelope()
Dim oJsonList = oTable.Rows.
Cast(Of DataRow).
Select(Function(r As DataRow) r.Item("VALUE").ToString()).
ToList()
Try
Dim oBuffer As Byte() = File.ReadAllBytes(oDocumentPath)
Dim oNewBuffer = PDFBurner.BurnInstantJSONAnnotationsToPDF(oBuffer, oJsonList)
Dim oNewPath = Path.Combine(oFileInfo.Directory.FullName, $"{oFileInfo.Name}.burned.pdf")
Dim oDocumentPath = LoadEnvelopeDocument()
Dim oFileInfo = New FileInfo(oDocumentPath)
Dim oTable = LoadAnnotationDataForEnvelope()
Dim oJsonList = oTable.Rows.
Cast(Of DataRow).
Select(Function(r As DataRow) r.Item("VALUE").ToString()).
ToList()
Dim oBuffer As Byte() = File.ReadAllBytes(oDocumentPath)
Dim oNewBuffer = PDFBurner.BurnInstantJSONAnnotationsToPDF(oBuffer, oJsonList)
Dim oNewPath = Path.Combine(oFileInfo.Directory.FullName, $"{oFileInfo.Name}.burned.pdf")
File.WriteAllBytes(oNewPath, oNewBuffer)
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical)
End Try
File.WriteAllBytes(oNewPath, oNewBuffer)
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click