Compare commits
3 Commits
8eefd94569
...
13bd727b3e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
13bd727b3e | ||
|
|
9021291aef | ||
|
|
8bd7ab13d0 |
@@ -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"
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using DigitalData.Core.API;
|
||||
using DigitalData.Core.Application;
|
||||
using DigitalData.UserManager.Application;
|
||||
using DigitalData.UserManager.Infrastructure.Repositories;
|
||||
using EnvelopeGenerator.Application;
|
||||
using EnvelopeGenerator.Infrastructure;
|
||||
using Microsoft.AspNetCore.Authentication.Cookies;
|
||||
using Microsoft.AspNetCore.Localization;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
@@ -6,4 +6,6 @@ Public Class Config
|
||||
|
||||
Public Property Debug As Boolean = False
|
||||
Public Property IntervalInMin As Integer = 1
|
||||
|
||||
Public Property IgnoredLabels As List(Of String) = New List(Of String) From {"Date", "Datum", "ZIP", "PLZ", "Place", "Ort"}
|
||||
End Class
|
||||
|
||||
@@ -11,13 +11,15 @@ Public Class Scheduler
|
||||
Private Scheduler As IScheduler
|
||||
Private ReadOnly ConnectionString As String
|
||||
Private ReadOnly LicenseKey As String
|
||||
Private Property _ignoredLabels As List(Of String)
|
||||
|
||||
Private Const JobName = "CertificateDocumentJob"
|
||||
|
||||
Public Sub New(pLogConfig As LogConfig, pConnectionString As String, pLicenseKey As String)
|
||||
Public Sub New(pLogConfig As LogConfig, pConnectionString As String, pLicenseKey As String, ignoredLabels As List(Of String))
|
||||
MyBase.New(pLogConfig)
|
||||
ConnectionString = pConnectionString
|
||||
LicenseKey = pLicenseKey
|
||||
_ignoredLabels = ignoredLabels
|
||||
|
||||
Dim oLogProvider = New LogProvider(Logger)
|
||||
Logging.LogProvider.SetCurrentLogProvider(oLogProvider)
|
||||
@@ -36,7 +38,8 @@ Public Class Scheduler
|
||||
Dim oJobData = New JobDataMap() From {
|
||||
{Common.Constants.GDPICTURE, LicenseKey},
|
||||
{Common.Constants.LOGCONFIG, LogConfig},
|
||||
{Common.Constants.DATABASE, ConnectionString}
|
||||
{Common.Constants.DATABASE, ConnectionString},
|
||||
{Common.Constants.IGNORED_LABELS, _ignoredLabels}
|
||||
}
|
||||
|
||||
Logger.Debug("Initialized Job [{0}]", JobName)
|
||||
|
||||
@@ -59,7 +59,7 @@ Public Class Service
|
||||
|
||||
Logger.Debug("Inititalize Quartz")
|
||||
|
||||
Scheduler = New Scheduler(LogConfig, Config.ConnectionString, oKey)
|
||||
Scheduler = New Scheduler(LogConfig, Config.ConnectionString, oKey, Config.IgnoredLabels)
|
||||
Await Scheduler.Start(Config.IntervalInMin)
|
||||
|
||||
Logger.Info("Started [{0}] !", ServiceName)
|
||||
|
||||
@@ -15,13 +15,14 @@ Public Class frmFinalizePDF
|
||||
Private Manager As AnnotationManager
|
||||
Private PDFBurner As FinalizeDocument.PDFBurner
|
||||
Private pGDPictureLicenseKey As String = "21182889975216572111813147150675976632"
|
||||
Private ReadOnly _ignoredLabels As New List(Of String) From {"Date", "Datum", "ZIP", "PLZ", "Place", "Ort"}
|
||||
|
||||
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 FinalizeDocument.PDFBurner(LogConfig, pGDPictureLicenseKey)
|
||||
PDFBurner = New FinalizeDocument.PDFBurner(LogConfig, pGDPictureLicenseKey, _ignoredLabels)
|
||||
|
||||
Viewer = New GdViewer()
|
||||
Manager = New AnnotationManager()
|
||||
|
||||
BIN
EnvelopeGenerator.Web/Assets/icon.ico
Normal file
BIN
EnvelopeGenerator.Web/Assets/icon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 264 KiB |
@@ -4,12 +4,29 @@
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<PackageId>EnvelopeGenerator.Web</PackageId>
|
||||
<Version>1.0.0</Version>
|
||||
<Authors>Digital Data GmbH</Authors>
|
||||
<Company>Digital Data GmbH</Company>
|
||||
<Product>EnvelopeGenerator.Web</Product>
|
||||
<PackageIcon>Assets\icon.ico</PackageIcon>
|
||||
<PackageTags>digital data envelope generator web</PackageTags>
|
||||
<Description>EnvelopeGenerator.Web is an ASP.NET MVC application developed to manage signing processes. It uses Entity Framework Core (EF Core) for database operations. The user interface for signing processes is developed with Razor View Engine (.cshtml files) and JavaScript under wwwroot, integrated with PSPDFKit. This integration allows users to view and sign documents seamlessly.</Description>
|
||||
<ApplicationIcon>Assets\icon.ico</ApplicationIcon>
|
||||
<AssemblyVersion>1.1.0.0</AssemblyVersion>
|
||||
<FileVersion>1.1.0.0</FileVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="Views\Shared\Error.html" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="Assets\icon.ico">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AutoMapper" Version="13.0.1" />
|
||||
<PackageReference Include="DigitalData.Core.Abstractions" Version="1.0.1.1" />
|
||||
@@ -94,4 +111,11 @@
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="Assets\icon.ico">
|
||||
<Pack>True</Pack>
|
||||
<PackagePath>\</PackagePath>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.5.33516.290
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EnvelopeGenerator.Web", "EnvelopeGenerator.Web.csproj", "{BB77E8E4-004E-4FC3-8349-6ACC49AE9FDE}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{BB77E8E4-004E-4FC3-8349-6ACC49AE9FDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{BB77E8E4-004E-4FC3-8349-6ACC49AE9FDE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{BB77E8E4-004E-4FC3-8349-6ACC49AE9FDE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{BB77E8E4-004E-4FC3-8349-6ACC49AE9FDE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {DA6F996F-F726-4FF4-8100-384271A96307}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
Reference in New Issue
Block a user