report & service fixes
This commit is contained in:
@@ -3,6 +3,7 @@ Imports DigitalData.Modules.Logging
|
||||
Imports GdPicture14
|
||||
Imports Newtonsoft.Json.Linq
|
||||
Imports EnvelopeGenerator.Common.Jobs
|
||||
Imports System.IO
|
||||
|
||||
Public Class frmFinalizePDF
|
||||
Private Const CONNECTIONSTRING = "Server=sDD-VMP04-SQL17\DD_DEVELOP01;Database=DD_ECM;User Id=sa;Password=+bk8oAbbQP1AzoHtvZUbd+Mbok2f8Fl4miEx1qssJ5yEaEWoQJ9prg4L14fURpPnqi1WMNs9fE4=;"
|
||||
@@ -12,14 +13,15 @@ Public Class frmFinalizePDF
|
||||
|
||||
Private Viewer As GdViewer
|
||||
Private Manager As AnnotationManager
|
||||
Private PDFBurner As PDFBurner
|
||||
Private PDFBurner As FinalizeDocument.PDFBurner
|
||||
|
||||
|
||||
Private Sub frmFinalizePDF_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
LogConfig = New LogConfig(LogConfig.PathType.CustomPath, Application.StartupPath)
|
||||
Database = New MSSQLServer(LogConfig, MSSQLServer.DecryptConnectionString(CONNECTIONSTRING))
|
||||
|
||||
PDFBurner = New PDFBurner(LogConfig, "21182889975216572111813147150675976632")
|
||||
|
||||
PDFBurner = New FinalizeDocument.PDFBurner(LogConfig, "21182889975216572111813147150675976632")
|
||||
|
||||
Manager = New AnnotationManager()
|
||||
Dim oLicense = New LicenseManager()
|
||||
@@ -46,13 +48,18 @@ Public Class frmFinalizePDF
|
||||
|
||||
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()
|
||||
|
||||
PDFBurner.BurnInstantJSONAnnotationsToPDF(oDocumentPath, oJsonList, $"{oDocumentPath}.burned.pdf")
|
||||
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)
|
||||
End Sub
|
||||
|
||||
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
|
||||
|
||||
Reference in New Issue
Block a user