This commit is contained in:
Developer01
2024-07-18 14:50:20 +02:00
51 changed files with 6362 additions and 113 deletions

View File

@@ -102,6 +102,7 @@
Public Const DATABASE = "DATABASE"
Public Const LOGCONFIG = "LOGCONFIG"
Public Const GDPICTURE = "GDPICTURE"
Public Const IGNORED_LABELS = "IgnoredLabels"
Public Const GREEN_300 = "#bbf7d0"
Public Const RED_300 = "#fecaca"

View File

@@ -7,17 +7,9 @@ Imports System.Security.Cryptography
Imports System.IO
Imports EnvelopeGenerator.Common.Jobs.FinalizeDocument.FinalizeDocumentExceptions
Imports EnvelopeGenerator.Common.Jobs.FinalizeDocument
Imports EnvelopeGenerator.Common.My.Resources
Imports EnvelopeGenerator.Common.Constants
Imports DevExpress.XtraBars.Docking
Imports System.ServiceModel
Imports DevExpress.XtraRichEdit.Export
Imports DevExpress.Pdf.Native.BouncyCastle.Asn1.Cms
Imports DevExpress.DataAccess.Sql
Imports DevExpress.DataProcessing
Imports Quartz.Logging.OperationName
Imports System.Data.SqlClient
Imports System.Windows.Forms
Namespace Jobs
Public Class FinalizeDocumentJob
@@ -82,7 +74,8 @@ Namespace Jobs
InitializeServices(oState)
Logger.Debug("Loading PDFBurner..")
PDFBurner = New PDFBurner(LogConfig, oGdPictureKey)
Dim ignoredLabels As List(Of String) = pContext.MergedJobDataMap.Item(Constants.IGNORED_LABELS)
PDFBurner = New PDFBurner(LogConfig, oGdPictureKey, ignoredLabels)
Logger.Debug("Loading PDFMerger..")
PDFMerger = New PDFMerger(LogConfig, oGdPictureKey)

View File

@@ -16,14 +16,17 @@ Namespace Jobs.FinalizeDocument
Private Const ANNOTATION_TYPE_IMAGE = "pspdfkit/image"
Private Const ANNOTATION_TYPE_INK = "pspdfkit/ink"
Private Const ANNOTATION_TYPE_WIDGET = "pspdfkit/widget"
Private Property _ignoredLabels As List(Of String)
Public Sub New(pLogConfig As LogConfig, pGDPictureLicenseKey As String)
Public Sub New(pLogConfig As LogConfig, pGDPictureLicenseKey As String, ignoredLabels As List(Of String))
MyBase.New(pLogConfig)
LicenseManager = New LicenseManager()
LicenseManager.RegisterKEY(pGDPictureLicenseKey)
Manager = New AnnotationManager()
_ignoredLabels = ignoredLabels
End Sub
Public Function BurnInstantJSONAnnotationsToPDF(pSourceBuffer As Byte(), pInstantJSONList As List(Of String)) As Byte()
@@ -82,7 +85,7 @@ Namespace Jobs.FinalizeDocument
Case ANNOTATION_TYPE_WIDGET
'Add form field values
Dim formFieldValue = oAnnotationData.formFieldValues.FirstOrDefault(Function(fv) fv.name = oAnnotation.id)
If formFieldValue IsNot Nothing Then
If formFieldValue IsNot Nothing AndAlso Not _ignoredLabels.Contains(formFieldValue.value) Then
AddFormFieldValue(oAnnotation, formFieldValue)
End If
End Select