Compare commits
60 Commits
deda2480b0
...
bugfix/sig
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4d34eb7adc | ||
|
|
7481691b4e | ||
|
|
0d635830f9 | ||
|
|
9b72a7b472 | ||
|
|
ea09edbc7f | ||
|
|
bd150bf0c0 | ||
|
|
4a53e24618 | ||
|
|
7c969c8950 | ||
|
|
77831592f9 | ||
|
|
55290c93e7 | ||
|
|
77713997bf | ||
|
|
8824bfef00 | ||
|
|
cc6b4e63a9 | ||
|
|
99f7a5ee43 | ||
|
|
b566785668 | ||
|
|
0e0f3f412d | ||
|
|
f8920a573b | ||
|
|
cc07a65f09 | ||
|
|
fbba7f2bfc | ||
|
|
ba392eb128 | ||
|
|
e4906ad9be | ||
|
|
98773eb888 | ||
|
|
943481da80 | ||
|
|
b5579a68cd | ||
|
|
fb069d0ee2 | ||
|
|
559c4b6340 | ||
|
|
891436ceef | ||
|
|
88777e0c27 | ||
|
|
7eb8ae6697 | ||
|
|
6083eea496 | ||
|
|
88c2721ba5 | ||
|
|
db5a2a8640 | ||
|
|
fb0022bd2c | ||
|
|
c45e6875d0 | ||
|
|
0f855158c3 | ||
|
|
e9cb49c6a7 | ||
|
|
9ae1efb946 | ||
|
|
eef6bf27f1 | ||
|
|
2dfe508552 | ||
|
|
a7b980bd28 | ||
|
|
2d7c0a292b | ||
|
|
91f1296e9b | ||
|
|
80e1e7dcf3 | ||
|
|
eb024acfa7 | ||
|
|
210ce072f8 | ||
|
|
036e1f68a8 | ||
|
|
0b87a3746a | ||
|
|
db84abf0e7 | ||
|
|
14be46d3d6 | ||
|
|
78b5e3f5cc | ||
|
|
093e64de81 | ||
|
|
43db4e275b | ||
|
|
353f7698f4 | ||
|
|
d5b4ea46d3 | ||
|
|
b6563d71b0 | ||
|
|
8a6a11c1bc | ||
|
|
cbd71aa2b9 | ||
|
|
df019a7243 | ||
|
|
6c222ca9ad | ||
|
|
da3c7bc0c2 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -363,3 +363,5 @@ MigrationBackup/
|
|||||||
FodyWeavers.xsd
|
FodyWeavers.xsd
|
||||||
/EnvelopeGenerator.Web/.config/dotnet-tools.json
|
/EnvelopeGenerator.Web/.config/dotnet-tools.json
|
||||||
/EnvelopeGenerator.GeneratorAPI/ClientApp/envelope-generator-ui/.vscode
|
/EnvelopeGenerator.GeneratorAPI/ClientApp/envelope-generator-ui/.vscode
|
||||||
|
/EnvelopeGenerator.Tests.Application/Services/BugFixTests.cs
|
||||||
|
/EnvelopeGenerator.Tests.Application/annotations.json
|
||||||
|
|||||||
@@ -8,7 +8,9 @@ namespace EnvelopeGenerator.Application.DTOs
|
|||||||
int ReceiverId,
|
int ReceiverId,
|
||||||
int Status,
|
int Status,
|
||||||
DateTime? StatusChangedWhen,
|
DateTime? StatusChangedWhen,
|
||||||
string Value,
|
|
||||||
DateTime AddedWhen,
|
DateTime AddedWhen,
|
||||||
DateTime? ChangedWhen) : IUnique<int>;
|
DateTime? ChangedWhen) : IUnique<int>
|
||||||
|
{
|
||||||
|
public string? Value { get; set; }
|
||||||
|
};
|
||||||
}
|
}
|
||||||
@@ -64,8 +64,8 @@
|
|||||||
<Reference Include="DevExpress.XtraLayout.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
<Reference Include="DevExpress.XtraLayout.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||||
<Reference Include="DevExpress.XtraPdfViewer.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
<Reference Include="DevExpress.XtraPdfViewer.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||||
<Reference Include="DevExpress.XtraTreeList.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
<Reference Include="DevExpress.XtraTreeList.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||||
<Reference Include="DigitalData.Controls.DocumentViewer">
|
<Reference Include="DigitalData.Controls.DocumentViewer, Version=1.9.8.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\2_DLL Projekte\DDMonorepo\Controls.DocumentViewer\bin\Debug\DigitalData.Controls.DocumentViewer.dll</HintPath>
|
<HintPath>..\packages\DigitalData.Controls.DocumentViewer.1.9.8\lib\net462\DigitalData.Controls.DocumentViewer.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="DigitalData.Modules.Base, Version=1.3.8.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="DigitalData.Modules.Base, Version=1.3.8.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\DigitalData.Modules.Base.1.3.8\lib\net462\DigitalData.Modules.Base.dll</HintPath>
|
<HintPath>..\packages\DigitalData.Modules.Base.1.3.8\lib\net462\DigitalData.Modules.Base.dll</HintPath>
|
||||||
@@ -82,6 +82,9 @@
|
|||||||
<Reference Include="DigitalData.Modules.Logging, Version=2.6.5.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="DigitalData.Modules.Logging, Version=2.6.5.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\DigitalData.Modules.Logging.2.6.5\lib\net462\DigitalData.Modules.Logging.dll</HintPath>
|
<HintPath>..\packages\DigitalData.Modules.Logging.2.6.5\lib\net462\DigitalData.Modules.Logging.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="DigitalData.Modules.Messaging, Version=1.9.8.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\DigitalData.Modules.Messaging.1.9.8\lib\net462\DigitalData.Modules.Messaging.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="DocumentFormat.OpenXml, Version=3.2.0.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL">
|
<Reference Include="DocumentFormat.OpenXml, Version=3.2.0.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\DocumentFormat.OpenXml.3.2.0\lib\net46\DocumentFormat.OpenXml.dll</HintPath>
|
<HintPath>..\packages\DocumentFormat.OpenXml.3.2.0\lib\net46\DocumentFormat.OpenXml.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
@@ -167,8 +170,17 @@
|
|||||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.wia.gateway.dll</HintPath>
|
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.wia.gateway.dll</HintPath>
|
||||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.9.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Bcl.Cryptography, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Microsoft.Bcl.Cryptography.9.0.0\lib\net462\Microsoft.Bcl.Cryptography.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Identity.Client, Version=4.55.0.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Microsoft.Identity.Client.4.55.0\lib\net461\Microsoft.Identity.Client.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.IdentityModel.Abstractions, Version=6.22.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Microsoft.IdentityModel.Abstractions.6.22.0\lib\net461\Microsoft.IdentityModel.Abstractions.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
@@ -191,15 +203,18 @@
|
|||||||
<Reference Include="RtfPipe, Version=2.0.7677.4303, Culture=neutral, PublicKeyToken=5f6ab4ce530296d2, processorArchitecture=MSIL">
|
<Reference Include="RtfPipe, Version=2.0.7677.4303, Culture=neutral, PublicKeyToken=5f6ab4ce530296d2, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\RtfPipe.2.0.7677.4303\lib\net45\RtfPipe.dll</HintPath>
|
<HintPath>..\packages\RtfPipe.2.0.7677.4303\lib\net45\RtfPipe.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="S22.Imap, Version=3.6.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\S22.Imap.3.6.0.0\lib\net40\S22.Imap.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Buffers, Version=4.0.4.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.Buffers, Version=4.0.4.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Buffers.4.6.0\lib\net462\System.Buffers.dll</HintPath>
|
<HintPath>..\packages\System.Buffers.4.6.0\lib\net462\System.Buffers.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.CodeDom, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.CodeDom, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.CodeDom.8.0.0\lib\net462\System.CodeDom.dll</HintPath>
|
<HintPath>..\packages\System.CodeDom.9.0.0\lib\net462\System.CodeDom.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Collections.Immutable, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Collections.Immutable, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Collections.Immutable.8.0.0\lib\net462\System.Collections.Immutable.dll</HintPath>
|
<HintPath>..\packages\System.Collections.Immutable.9.0.0\lib\net462\System.Collections.Immutable.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||||
<Reference Include="System.Configuration" />
|
<Reference Include="System.Configuration" />
|
||||||
@@ -207,9 +222,16 @@
|
|||||||
<Reference Include="System.Data.Odbc, Version=6.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.Data.Odbc, Version=6.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Data.Odbc.6.0.1\lib\net461\System.Data.Odbc.dll</HintPath>
|
<HintPath>..\packages\System.Data.Odbc.6.0.1\lib\net461\System.Data.Odbc.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="System.Formats.Asn1, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Formats.Asn1.9.0.0\lib\net462\System.Formats.Asn1.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.IdentityModel" />
|
||||||
<Reference Include="System.IO.Compression" />
|
<Reference Include="System.IO.Compression" />
|
||||||
<Reference Include="System.IO.Packaging, Version=8.0.0.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.IO.Packaging, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.IO.Packaging.8.0.1\lib\net462\System.IO.Packaging.dll</HintPath>
|
<HintPath>..\packages\System.IO.Packaging.9.0.0\lib\net462\System.IO.Packaging.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.IO.Pipelines, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.IO.Pipelines.9.0.0\lib\net462\System.IO.Pipelines.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Management" />
|
<Reference Include="System.Management" />
|
||||||
<Reference Include="System.Memory, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.Memory, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
@@ -227,14 +249,14 @@
|
|||||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.1.0\lib\net462\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.1.0\lib\net462\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Security" />
|
<Reference Include="System.Security" />
|
||||||
<Reference Include="System.Security.Cryptography.Pkcs, Version=8.0.0.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Security.Cryptography.Pkcs, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Security.Cryptography.Pkcs.8.0.1\lib\net462\System.Security.Cryptography.Pkcs.dll</HintPath>
|
<HintPath>..\packages\System.Security.Cryptography.Pkcs.9.0.0\lib\net462\System.Security.Cryptography.Pkcs.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Text.Encodings.Web, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.Text.Encodings.Web, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Text.Encodings.Web.8.0.0\lib\net462\System.Text.Encodings.Web.dll</HintPath>
|
<HintPath>..\packages\System.Text.Encodings.Web.9.0.0\lib\net462\System.Text.Encodings.Web.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Text.Json, Version=8.0.0.5, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.Text.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Text.Json.8.0.5\lib\net462\System.Text.Json.dll</HintPath>
|
<HintPath>..\packages\System.Text.Json.9.0.0\lib\net462\System.Text.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
|
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||||
@@ -334,6 +356,23 @@
|
|||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Content Include="GdPicture.NET.14.barcode.1d.reader.64.dll" />
|
||||||
|
<Content Include="GdPicture.NET.14.barcode.1d.reader.dll" />
|
||||||
|
<Content Include="GdPicture.NET.14.barcode.2d.reader.64.dll" />
|
||||||
|
<Content Include="GdPicture.NET.14.barcode.2d.reader.dll" />
|
||||||
|
<Content Include="GdPicture.NET.14.filters.64.dll" />
|
||||||
|
<Content Include="GdPicture.NET.14.filters.dll" />
|
||||||
|
<Content Include="GdPicture.NET.14.image.gdimgplug.64.dll" />
|
||||||
|
<Content Include="GdPicture.NET.14.image.gdimgplug.dll" />
|
||||||
|
<Content Include="GdPicture.NET.14.Imaging.ML.64.dll" />
|
||||||
|
<Content Include="GdPicture.NET.14.Imaging.ML.dll" />
|
||||||
|
<Content Include="GdPicture.NET.14.Imaging.Rendering.Skia.64.dll" />
|
||||||
|
<Content Include="GdPicture.NET.14.Imaging.Rendering.Skia.dll" />
|
||||||
|
<Content Include="GdPicture.NET.14.machine.vision.64.dll" />
|
||||||
|
<Content Include="GdPicture.NET.14.machine.vision.dll" />
|
||||||
|
<Content Include="GdPicture.NET.14.twain.client.64.dll" />
|
||||||
|
<Content Include="GdPicture.NET.14.twain.client.dll" />
|
||||||
|
<Content Include="MailLicense.xml" />
|
||||||
<Content Include="README.txt" />
|
<Content Include="README.txt" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||||
BIN
EnvelopeGenerator.BBTests/GdPicture.NET.14.Imaging.ML.64.dll
Normal file
BIN
EnvelopeGenerator.BBTests/GdPicture.NET.14.Imaging.ML.64.dll
Normal file
Binary file not shown.
BIN
EnvelopeGenerator.BBTests/GdPicture.NET.14.Imaging.ML.dll
Normal file
BIN
EnvelopeGenerator.BBTests/GdPicture.NET.14.Imaging.ML.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
EnvelopeGenerator.BBTests/GdPicture.NET.14.barcode.1d.reader.dll
Normal file
BIN
EnvelopeGenerator.BBTests/GdPicture.NET.14.barcode.1d.reader.dll
Normal file
Binary file not shown.
Binary file not shown.
BIN
EnvelopeGenerator.BBTests/GdPicture.NET.14.barcode.2d.reader.dll
Normal file
BIN
EnvelopeGenerator.BBTests/GdPicture.NET.14.barcode.2d.reader.dll
Normal file
Binary file not shown.
BIN
EnvelopeGenerator.BBTests/GdPicture.NET.14.filters.64.dll
Normal file
BIN
EnvelopeGenerator.BBTests/GdPicture.NET.14.filters.64.dll
Normal file
Binary file not shown.
BIN
EnvelopeGenerator.BBTests/GdPicture.NET.14.filters.dll
Normal file
BIN
EnvelopeGenerator.BBTests/GdPicture.NET.14.filters.dll
Normal file
Binary file not shown.
Binary file not shown.
BIN
EnvelopeGenerator.BBTests/GdPicture.NET.14.image.gdimgplug.dll
Normal file
BIN
EnvelopeGenerator.BBTests/GdPicture.NET.14.image.gdimgplug.dll
Normal file
Binary file not shown.
BIN
EnvelopeGenerator.BBTests/GdPicture.NET.14.machine.vision.64.dll
Normal file
BIN
EnvelopeGenerator.BBTests/GdPicture.NET.14.machine.vision.64.dll
Normal file
Binary file not shown.
BIN
EnvelopeGenerator.BBTests/GdPicture.NET.14.machine.vision.dll
Normal file
BIN
EnvelopeGenerator.BBTests/GdPicture.NET.14.machine.vision.dll
Normal file
Binary file not shown.
BIN
EnvelopeGenerator.BBTests/GdPicture.NET.14.twain.client.64.dll
Normal file
BIN
EnvelopeGenerator.BBTests/GdPicture.NET.14.twain.client.64.dll
Normal file
Binary file not shown.
BIN
EnvelopeGenerator.BBTests/GdPicture.NET.14.twain.client.dll
Normal file
BIN
EnvelopeGenerator.BBTests/GdPicture.NET.14.twain.client.dll
Normal file
Binary file not shown.
23
EnvelopeGenerator.BBTests/MailLicense.xml
Normal file
23
EnvelopeGenerator.BBTests/MailLicense.xml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<License>
|
||||||
|
<Id>4dc5ef40-f1a9-468b-994c-b7ed600ad878</Id>
|
||||||
|
<ProductName>Mail.dll</ProductName>
|
||||||
|
<SubscriptionUntil>2022-07-29</SubscriptionUntil>
|
||||||
|
<RegisteredTo>Digital Data GmbH</RegisteredTo>
|
||||||
|
<LicenseType>single developer</LicenseType>
|
||||||
|
<BuyerName>Digital Data GmbH</BuyerName>
|
||||||
|
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
|
||||||
|
<SignedInfo>
|
||||||
|
<CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" />
|
||||||
|
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
|
||||||
|
<Reference URI="">
|
||||||
|
<Transforms>
|
||||||
|
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
|
||||||
|
</Transforms>
|
||||||
|
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
|
||||||
|
<DigestValue>75MRtl4ipYelIZYlpT8O7QDX9Zc=</DigestValue>
|
||||||
|
</Reference>
|
||||||
|
</SignedInfo>
|
||||||
|
<SignatureValue>Raxfkz6DfQVs/sMvH+F2nH0eHXD8FoUFSdP3t7AgBUdpABJQx86srlyuMSEhXPlc1THCqPouEVob4RsWnd9OXvTiPPSOUSK9zuNG6uz93KLAhpSD5PraAgBCF4jwZArlAp7aCNfZpHqQ3w6TRHS+CfravUU0AHHG3MZ1ZcRkGuo=</SignatureValue>
|
||||||
|
</Signature>
|
||||||
|
</License>
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
@@ -85,20 +85,28 @@
|
|||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Security.Cryptography.Pkcs" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
<assemblyIdentity name="System.Security.Cryptography.Pkcs" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-8.0.0.1" newVersion="8.0.0.1" />
|
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.IO.Packaging" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
<assemblyIdentity name="System.IO.Packaging" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-8.0.0.1" newVersion="8.0.0.1" />
|
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
<assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-8.0.0.5" newVersion="8.0.0.5" />
|
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="FirebirdSql.Data.FirebirdClient" publicKeyToken="3750abcc3150b00c" culture="neutral" />
|
<assemblyIdentity name="FirebirdSql.Data.FirebirdClient" publicKeyToken="3750abcc3150b00c" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-7.5.0.0" newVersion="7.5.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-7.5.0.0" newVersion="7.5.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="GdPicture.NET.14.Common" publicKeyToken="f52a2e60ad468dbb" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-14.3.3.0" newVersion="14.3.3.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="GdPicture.NET.14.Imaging" publicKeyToken="f52a2e60ad468dbb" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-14.3.3.0" newVersion="14.3.3.0" />
|
||||||
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
<entityFramework>
|
<entityFramework>
|
||||||
@@ -15,7 +15,7 @@ Public Class frmFinalizePDF
|
|||||||
Private Manager As AnnotationManager
|
Private Manager As AnnotationManager
|
||||||
Private PDFBurner As FinalizeDocument.PDFBurner
|
Private PDFBurner As FinalizeDocument.PDFBurner
|
||||||
Private pGDPictureLicenseKey As String = "kG1Qf9PwmqgR8aDmIW2zI_ebj48RzqAJegRxcystEmkbTGQqfkNBdFOXIb6C_A00Ra8zZkrHdfjqzOPXK7kgkF2YDhvrqKfqh4WDug2vOt0qO31IommzkANSuLjZ4zmraoubyEVd25rE3veQ2h_j7tGIoH_LyIHmy24GaXsxdG0yCzIBMdiLbMMMDwcPY-809KeZ83Grv76OVhFvcbBWyYc251vou1N-kGg5_ZlHDgfWoY85gTLRxafjD3KS_i9ARW4BMiy36y8n7UP2jN8kGRnW_04ubpFtfjJqvtsrP_J9D0x7bqV8xtVtT5JI6dpKsVTiMgDCrIcoFSo5gCC1fw9oUopX4TDCkBQttO4-WHBlOeq9dG5Yb0otonVmJKaQA2tP6sMR-lZDs3ql_WI9t91yPWgpssrJUxSHDd27_LMTH_owJIqkF3NOJd9mYQuAv22oNKFYbH8e41pVKb8cT33Y9CgcQ_sy6YDA5PTuIRi67mjKge_nD9rd0IN213Ir9M_EFWqg9e4haWzIdHXQUo0md70kVhPX4UIH_BKJnxEEnFfoFRNMh77bB0N4jkcBEHPl-ghOERv8dOztf4vCnNpzzWvcLD2cqWIm6THy8XGGq9h4hp8aEreRleSMwv9QQAC7mjLwhQ1rBYkpUHlpTjhTLnMwHknl6HH0Z6zzmsgkRKVyfquv94Pd7QbQfZrRka0ss_48pf9p8hAywEn81Q=="
|
Private pGDPictureLicenseKey As String = "kG1Qf9PwmqgR8aDmIW2zI_ebj48RzqAJegRxcystEmkbTGQqfkNBdFOXIb6C_A00Ra8zZkrHdfjqzOPXK7kgkF2YDhvrqKfqh4WDug2vOt0qO31IommzkANSuLjZ4zmraoubyEVd25rE3veQ2h_j7tGIoH_LyIHmy24GaXsxdG0yCzIBMdiLbMMMDwcPY-809KeZ83Grv76OVhFvcbBWyYc251vou1N-kGg5_ZlHDgfWoY85gTLRxafjD3KS_i9ARW4BMiy36y8n7UP2jN8kGRnW_04ubpFtfjJqvtsrP_J9D0x7bqV8xtVtT5JI6dpKsVTiMgDCrIcoFSo5gCC1fw9oUopX4TDCkBQttO4-WHBlOeq9dG5Yb0otonVmJKaQA2tP6sMR-lZDs3ql_WI9t91yPWgpssrJUxSHDd27_LMTH_owJIqkF3NOJd9mYQuAv22oNKFYbH8e41pVKb8cT33Y9CgcQ_sy6YDA5PTuIRi67mjKge_nD9rd0IN213Ir9M_EFWqg9e4haWzIdHXQUo0md70kVhPX4UIH_BKJnxEEnFfoFRNMh77bB0N4jkcBEHPl-ghOERv8dOztf4vCnNpzzWvcLD2cqWIm6THy8XGGq9h4hp8aEreRleSMwv9QQAC7mjLwhQ1rBYkpUHlpTjhTLnMwHknl6HH0Z6zzmsgkRKVyfquv94Pd7QbQfZrRka0ss_48pf9p8hAywEn81Q=="
|
||||||
Private ReadOnly _ignoredLabels As New List(Of String) From {"Date", "Datum", "ZIP", "PLZ", "Place", "Ort"}
|
Private ReadOnly _ignoredLabels As New List(Of String) From {"Date", "Datum", "ZIP", "PLZ", "Place", "Ort", "Position", "Stellung"}
|
||||||
|
|
||||||
Private Sub frmFinalizePDF_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
Private Sub frmFinalizePDF_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||||
LogConfig = New LogConfig(LogConfig.PathType.CustomPath, Application.StartupPath)
|
LogConfig = New LogConfig(LogConfig.PathType.CustomPath, Application.StartupPath)
|
||||||
@@ -48,20 +48,33 @@ Public Class frmFinalizePDF
|
|||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Private Function ReadEnvelope(ByVal pEnvID As Integer) As Byte()
|
||||||
|
Dim strSql As String = "Select [BYTE_DATA] from [TBSIG_ENVELOPE_DOCUMENT] WHERE ENVELOPE_ID = " & pEnvID
|
||||||
|
Dim obyteDB = Database.GetScalarValue(strSql)
|
||||||
|
If Not IsDBNull(obyteDB) Then
|
||||||
|
Dim fileData As Byte() = DirectCast(Database.GetScalarValue(strSql), Byte())
|
||||||
|
If fileData IsNot Nothing Then
|
||||||
|
Return fileData
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
Throw New InvalidOperationException($"Byte data is null. Envelope ID: {pEnvID}")
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
||||||
Try
|
Try
|
||||||
|
|
||||||
Dim oDocumentPath = LoadEnvelopeDocument()
|
|
||||||
Dim oFileInfo = New FileInfo(oDocumentPath)
|
|
||||||
Dim oTable = LoadAnnotationDataForEnvelope()
|
Dim oTable = LoadAnnotationDataForEnvelope()
|
||||||
Dim oJsonList = oTable.Rows.
|
Dim oJsonList = oTable.Rows.
|
||||||
Cast(Of DataRow).
|
Cast(Of DataRow).
|
||||||
Select(Function(r As DataRow) r.Item("VALUE").ToString()).
|
Select(Function(r As DataRow) r.Item("VALUE").ToString()).
|
||||||
ToList()
|
ToList()
|
||||||
|
|
||||||
Dim oBuffer As Byte() = File.ReadAllBytes(oDocumentPath)
|
Dim oBuffer As Byte() = ReadEnvelope(CInt(txtEnvelope.Text))
|
||||||
Dim oNewBuffer = PDFBurner.BurnInstantJSONAnnotationsToPDF(oBuffer, oJsonList)
|
Dim oNewBuffer = PDFBurner.BurnInstantJSONAnnotationsToPDF(oBuffer, oJsonList)
|
||||||
Dim oNewPath = Path.Combine(oFileInfo.Directory.FullName, $"{oFileInfo.Name}.burned.pdf")
|
Dim desktopPath As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
|
||||||
|
Dim oNewPath = Path.Combine(desktopPath, $"E{txtEnvelope.Text}R{txtReceiver.Text}.burned.pdf")
|
||||||
|
|
||||||
File.WriteAllBytes(oNewPath, oNewBuffer)
|
File.WriteAllBytes(oNewPath, oNewBuffer)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
@@ -1,11 +1,13 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="BouncyCastle.Cryptography" version="2.5.0" targetFramework="net462" />
|
<package id="BouncyCastle.Cryptography" version="2.5.0" targetFramework="net462" />
|
||||||
|
<package id="DigitalData.Controls.DocumentViewer" version="1.9.8" targetFramework="net462" />
|
||||||
<package id="DigitalData.Modules.Base" version="1.3.8" targetFramework="net462" />
|
<package id="DigitalData.Modules.Base" version="1.3.8" targetFramework="net462" />
|
||||||
<package id="DigitalData.Modules.Config" version="1.3.0" targetFramework="net462" />
|
<package id="DigitalData.Modules.Config" version="1.3.0" targetFramework="net462" />
|
||||||
<package id="DigitalData.Modules.Database" version="2.3.5.4" targetFramework="net462" />
|
<package id="DigitalData.Modules.Database" version="2.3.5.4" targetFramework="net462" />
|
||||||
<package id="DigitalData.Modules.Encryption" version="1.3.1" targetFramework="net462" />
|
<package id="DigitalData.Modules.Encryption" version="1.3.1" targetFramework="net462" />
|
||||||
<package id="DigitalData.Modules.Logging" version="2.6.5" targetFramework="net462" />
|
<package id="DigitalData.Modules.Logging" version="2.6.5" targetFramework="net462" />
|
||||||
|
<package id="DigitalData.Modules.Messaging" version="1.9.8" targetFramework="net462" />
|
||||||
<package id="DocumentFormat.OpenXml" version="3.2.0" targetFramework="net462" />
|
<package id="DocumentFormat.OpenXml" version="3.2.0" targetFramework="net462" />
|
||||||
<package id="DocumentFormat.OpenXml.Framework" version="3.2.0" targetFramework="net462" />
|
<package id="DocumentFormat.OpenXml.Framework" version="3.2.0" targetFramework="net462" />
|
||||||
<package id="EntityFramework" version="6.4.4" targetFramework="net462" />
|
<package id="EntityFramework" version="6.4.4" targetFramework="net462" />
|
||||||
@@ -14,8 +16,11 @@
|
|||||||
<package id="GdPicture" version="14.3.3" targetFramework="net462" />
|
<package id="GdPicture" version="14.3.3" targetFramework="net462" />
|
||||||
<package id="GdPicture.runtimes.windows" version="14.3.3" targetFramework="net462" />
|
<package id="GdPicture.runtimes.windows" version="14.3.3" targetFramework="net462" />
|
||||||
<package id="Microsoft.AspNet.WebApi.Client" version="6.0.0" targetFramework="net462" />
|
<package id="Microsoft.AspNet.WebApi.Client" version="6.0.0" targetFramework="net462" />
|
||||||
<package id="Microsoft.Bcl.AsyncInterfaces" version="8.0.0" targetFramework="net462" />
|
<package id="Microsoft.Bcl.AsyncInterfaces" version="9.0.0" targetFramework="net462" />
|
||||||
|
<package id="Microsoft.Bcl.Cryptography" version="9.0.0" targetFramework="net462" />
|
||||||
<package id="Microsoft.CSharp" version="4.7.0" targetFramework="net462" />
|
<package id="Microsoft.CSharp" version="4.7.0" targetFramework="net462" />
|
||||||
|
<package id="Microsoft.Identity.Client" version="4.55.0" targetFramework="net462" />
|
||||||
|
<package id="Microsoft.IdentityModel.Abstractions" version="6.22.0" targetFramework="net462" />
|
||||||
<package id="Microsoft.VisualBasic" version="10.3.0" targetFramework="net462" />
|
<package id="Microsoft.VisualBasic" version="10.3.0" targetFramework="net462" />
|
||||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net462" />
|
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net462" />
|
||||||
<package id="Newtonsoft.Json.Bson" version="1.0.2" targetFramework="net462" />
|
<package id="Newtonsoft.Json.Bson" version="1.0.2" targetFramework="net462" />
|
||||||
@@ -24,18 +29,21 @@
|
|||||||
<package id="protobuf-net" version="3.2.46" targetFramework="net462" />
|
<package id="protobuf-net" version="3.2.46" targetFramework="net462" />
|
||||||
<package id="protobuf-net.Core" version="3.2.46" targetFramework="net462" />
|
<package id="protobuf-net.Core" version="3.2.46" targetFramework="net462" />
|
||||||
<package id="RtfPipe" version="2.0.7677.4303" targetFramework="net462" />
|
<package id="RtfPipe" version="2.0.7677.4303" targetFramework="net462" />
|
||||||
|
<package id="S22.Imap" version="3.6.0.0" targetFramework="net462" />
|
||||||
<package id="System.Buffers" version="4.6.0" targetFramework="net462" />
|
<package id="System.Buffers" version="4.6.0" targetFramework="net462" />
|
||||||
<package id="System.CodeDom" version="8.0.0" targetFramework="net462" />
|
<package id="System.CodeDom" version="9.0.0" targetFramework="net462" />
|
||||||
<package id="System.Collections.Immutable" version="8.0.0" targetFramework="net462" />
|
<package id="System.Collections.Immutable" version="9.0.0" targetFramework="net462" />
|
||||||
<package id="System.Data.Odbc" version="6.0.1" targetFramework="net462" />
|
<package id="System.Data.Odbc" version="6.0.1" targetFramework="net462" />
|
||||||
<package id="System.IO.Packaging" version="8.0.1" targetFramework="net462" />
|
<package id="System.Formats.Asn1" version="9.0.0" targetFramework="net462" />
|
||||||
<package id="System.Management" version="8.0.0" targetFramework="net462" />
|
<package id="System.IO.Packaging" version="9.0.0" targetFramework="net462" />
|
||||||
|
<package id="System.IO.Pipelines" version="9.0.0" targetFramework="net462" />
|
||||||
|
<package id="System.Management" version="9.0.0" targetFramework="net462" />
|
||||||
<package id="System.Memory" version="4.6.0" targetFramework="net462" />
|
<package id="System.Memory" version="4.6.0" targetFramework="net462" />
|
||||||
<package id="System.Numerics.Vectors" version="4.6.0" targetFramework="net462" />
|
<package id="System.Numerics.Vectors" version="4.6.0" targetFramework="net462" />
|
||||||
<package id="System.Runtime.CompilerServices.Unsafe" version="6.1.0" targetFramework="net462" />
|
<package id="System.Runtime.CompilerServices.Unsafe" version="6.1.0" targetFramework="net462" />
|
||||||
<package id="System.Security.Cryptography.Pkcs" version="8.0.1" targetFramework="net462" />
|
<package id="System.Security.Cryptography.Pkcs" version="9.0.0" targetFramework="net462" />
|
||||||
<package id="System.Text.Encodings.Web" version="8.0.0" targetFramework="net462" />
|
<package id="System.Text.Encodings.Web" version="9.0.0" targetFramework="net462" />
|
||||||
<package id="System.Text.Json" version="8.0.5" targetFramework="net462" />
|
<package id="System.Text.Json" version="9.0.0" targetFramework="net462" />
|
||||||
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net462" />
|
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net462" />
|
||||||
<package id="System.ValueTuple" version="4.5.0" targetFramework="net462" />
|
<package id="System.ValueTuple" version="4.5.0" targetFramework="net462" />
|
||||||
</packages>
|
</packages>
|
||||||
@@ -34,11 +34,13 @@ Namespace Jobs.FinalizeDocument
|
|||||||
|
|
||||||
Try
|
Try
|
||||||
Using oSourceStream As New MemoryStream(pSourceBuffer)
|
Using oSourceStream As New MemoryStream(pSourceBuffer)
|
||||||
|
' Open PDF
|
||||||
oResult = Manager.InitFromStream(oSourceStream)
|
oResult = Manager.InitFromStream(oSourceStream)
|
||||||
If oResult <> GdPictureStatus.OK Then
|
If oResult <> GdPictureStatus.OK Then
|
||||||
Throw New BurnAnnotationException($"Could not open document for burning: [{oResult}]")
|
Throw New BurnAnnotationException($"Could not open document for burning: [{oResult}]")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
' Add annotation to PDF
|
||||||
For Each oJSON In pInstantJSONList
|
For Each oJSON In pInstantJSONList
|
||||||
If AddInstantJSONAnnotationToPDF(oJSON) = False Then
|
If AddInstantJSONAnnotationToPDF(oJSON) = False Then
|
||||||
Logger.Warn($"Error in AddInstantJSONAnnotationToPDF - oJson: ")
|
Logger.Warn($"Error in AddInstantJSONAnnotationToPDF - oJson: ")
|
||||||
@@ -51,6 +53,7 @@ Namespace Jobs.FinalizeDocument
|
|||||||
Throw New BurnAnnotationException($"Could not burn annotations to file: [{oResult}]")
|
Throw New BurnAnnotationException($"Could not burn annotations to file: [{oResult}]")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'Save PDF
|
||||||
Using oNewStream As New MemoryStream()
|
Using oNewStream As New MemoryStream()
|
||||||
oResult = Manager.SaveDocumentToPDF(oNewStream)
|
oResult = Manager.SaveDocumentToPDF(oNewStream)
|
||||||
If oResult <> GdPictureStatus.OK Then
|
If oResult <> GdPictureStatus.OK Then
|
||||||
|
|||||||
@@ -156,7 +156,11 @@ Public Class EnvelopeEditorController
|
|||||||
|
|
||||||
Public Async Function CreateDocument(pDocumentFilePath As String) As Threading.Tasks.Task(Of EnvelopeDocument)
|
Public Async Function CreateDocument(pDocumentFilePath As String) As Threading.Tasks.Task(Of EnvelopeDocument)
|
||||||
Try
|
Try
|
||||||
Dim oFileInfo = New FileInfo(pDocumentFilePath)
|
Dim oFixedPath = FixPageRotation.FixPageRotation(pDocumentFilePath)
|
||||||
|
If oFixedPath <> pDocumentFilePath Then
|
||||||
|
Logger.Info("PageRotation has been reseted to 0.")
|
||||||
|
End If
|
||||||
|
Dim oFileInfo = New FileInfo(oFixedPath)
|
||||||
Dim oTempFiles As New TempFiles(State.LogConfig)
|
Dim oTempFiles As New TempFiles(State.LogConfig)
|
||||||
Dim oTempFilePath = Path.Combine(oTempFiles._TempPath, Guid.NewGuid().ToString + oFileInfo.Extension)
|
Dim oTempFilePath = Path.Combine(oTempFiles._TempPath, Guid.NewGuid().ToString + oFileInfo.Extension)
|
||||||
|
|
||||||
@@ -172,7 +176,7 @@ Public Class EnvelopeEditorController
|
|||||||
.FileNameOriginal = oFileInfo.Name,
|
.FileNameOriginal = oFileInfo.Name,
|
||||||
.Thumbnail = Thumbnail.GetThumbnailFromPDFFile(oTempFilePath),
|
.Thumbnail = Thumbnail.GetThumbnailFromPDFFile(oTempFilePath),
|
||||||
.PageCount = Thumbnail.GetPageCount(oTempFilePath),
|
.PageCount = Thumbnail.GetPageCount(oTempFilePath),
|
||||||
.Byte_Data = ReadFile(pDocumentFilePath)
|
.Byte_Data = ReadFile(oFixedPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
Return oDocument
|
Return oDocument
|
||||||
|
|||||||
@@ -77,9 +77,8 @@
|
|||||||
<Reference Include="DevExpress.XtraNavBar.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
<Reference Include="DevExpress.XtraNavBar.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||||
<Reference Include="DevExpress.XtraPrinting.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
<Reference Include="DevExpress.XtraPrinting.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||||
<Reference Include="DevExpress.XtraTreeList.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
<Reference Include="DevExpress.XtraTreeList.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||||
<Reference Include="DigitalData.Controls.DocumentViewer, Version=1.9.4.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="DigitalData.Controls.DocumentViewer, Version=1.9.8.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<HintPath>..\packages\DigitalData.Controls.DocumentViewer.1.9.8\lib\net462\DigitalData.Controls.DocumentViewer.dll</HintPath>
|
||||||
<HintPath>..\..\2_DLL Projekte\DDMonorepo\Controls.DocumentViewer\bin\Debug\DigitalData.Controls.DocumentViewer.dll</HintPath>
|
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="DigitalData.GUIs.Common">
|
<Reference Include="DigitalData.GUIs.Common">
|
||||||
<HintPath>..\..\2_DLL Projekte\DDMonorepo\GUIs.Common\bin\Debug\DigitalData.GUIs.Common.dll</HintPath>
|
<HintPath>..\..\2_DLL Projekte\DDMonorepo\GUIs.Common\bin\Debug\DigitalData.GUIs.Common.dll</HintPath>
|
||||||
@@ -117,9 +116,6 @@
|
|||||||
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.SqlServer.dll</HintPath>
|
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.SqlServer.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="EnvelopeGenerator.Common, Version=2.4.2.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\EnvelopeGenerator.Common.2.4.2\lib\net462\EnvelopeGenerator.Common.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="FirebirdSql.Data.FirebirdClient, Version=7.5.0.0, Culture=neutral, PublicKeyToken=3750abcc3150b00c, processorArchitecture=MSIL">
|
<Reference Include="FirebirdSql.Data.FirebirdClient, Version=7.5.0.0, Culture=neutral, PublicKeyToken=3750abcc3150b00c, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\FirebirdSql.Data.FirebirdClient.7.5.0\lib\net452\FirebirdSql.Data.FirebirdClient.dll</HintPath>
|
<HintPath>..\packages\FirebirdSql.Data.FirebirdClient.7.5.0\lib\net452\FirebirdSql.Data.FirebirdClient.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
@@ -187,6 +183,9 @@
|
|||||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.wia.gateway.dll</HintPath>
|
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.wia.gateway.dll</HintPath>
|
||||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="Mail">
|
||||||
|
<HintPath>P:\Projekte DIGITAL DATA\DIGITAL DATA - Entwicklung\DLL_Bibliotheken\Limilabs\Mail.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.9.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.9.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
@@ -363,6 +362,7 @@
|
|||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Helper\Encryption.vb" />
|
<Compile Include="Helper\Encryption.vb" />
|
||||||
|
<Compile Include="Helper\FixPageRotation.vb" />
|
||||||
<Compile Include="Helper\RefreshHelper.vb" />
|
<Compile Include="Helper\RefreshHelper.vb" />
|
||||||
<Compile Include="Helper\TempFiles.vb" />
|
<Compile Include="Helper\TempFiles.vb" />
|
||||||
<Compile Include="Helper\Thumbnail.vb" />
|
<Compile Include="Helper\Thumbnail.vb" />
|
||||||
@@ -465,10 +465,7 @@
|
|||||||
<Content Include="GdPicture.NET.14.machine.vision.dll" />
|
<Content Include="GdPicture.NET.14.machine.vision.dll" />
|
||||||
<Content Include="GdPicture.NET.14.twain.client.64.dll" />
|
<Content Include="GdPicture.NET.14.twain.client.64.dll" />
|
||||||
<Content Include="GdPicture.NET.14.twain.client.dll" />
|
<Content Include="GdPicture.NET.14.twain.client.dll" />
|
||||||
<Content Include="Images\circle.svg" />
|
<Content Include="MailLicense.xml" />
|
||||||
<Content Include="MailLicense.xml">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
<Content Include="README.txt" />
|
<Content Include="README.txt" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -476,6 +473,10 @@
|
|||||||
<Project>{6EA0C51F-C2B1-4462-8198-3DE0B32B74F8}</Project>
|
<Project>{6EA0C51F-C2B1-4462-8198-3DE0B32B74F8}</Project>
|
||||||
<Name>EnvelopeGenerator.Common</Name>
|
<Name>EnvelopeGenerator.Common</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\EnvelopeGenerator.Common\EnvelopeGenerator.Common.vbproj">
|
||||||
|
<Project>{6ea0c51f-c2b1-4462-8198-3de0b32b74f8}</Project>
|
||||||
|
<Name>EnvelopeGenerator.Common</Name>
|
||||||
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
|
|||||||
48
EnvelopeGenerator.Form/Helper/FixPageRotation.vb
Normal file
48
EnvelopeGenerator.Form/Helper/FixPageRotation.vb
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
Imports System.IO
|
||||||
|
Imports GdPicture14
|
||||||
|
|
||||||
|
Public Class FixPageRotation
|
||||||
|
''' <summary>
|
||||||
|
''' Checks if there are any rotations in the document. If so, normalizes the page rotation to 0 without affecting its visual appearance.
|
||||||
|
''' Creates and uses a new document with the corrected properties.
|
||||||
|
''' Fixes the issue of annotations being rotated to match the page's rotation.
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="pFilePath"></param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Shared Function FixPageRotation(pFilePath As String) As String
|
||||||
|
|
||||||
|
Dim oFolder As String = Path.GetDirectoryName(pFilePath)
|
||||||
|
Dim oChanged As Boolean = False
|
||||||
|
|
||||||
|
Using gdpicturePDF As New GdPicturePDF()
|
||||||
|
|
||||||
|
Dim status As GdPictureStatus = gdpicturePDF.LoadFromFile(pFilePath, True)
|
||||||
|
If status = GdPictureStatus.OK Then
|
||||||
|
|
||||||
|
Dim count As Integer = gdpicturePDF.GetPageCount()
|
||||||
|
For i As Integer = 1 To count
|
||||||
|
If gdpicturePDF.SelectPage(i) = GdPictureStatus.OK Then
|
||||||
|
Dim rotation As Integer = gdpicturePDF.GetPageRotation()
|
||||||
|
If rotation <> 0 Then
|
||||||
|
gdpicturePDF.NormalizePage()
|
||||||
|
oChanged = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
If oChanged Then
|
||||||
|
Dim newFilesPath As String = Path.Combine(oFolder, "RotationFixed_" & Path.GetFileName(pFilePath))
|
||||||
|
If gdpicturePDF.SaveToFile(newFilesPath) = GdPictureStatus.OK Then
|
||||||
|
Return newFilesPath
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Using
|
||||||
|
|
||||||
|
Return pFilePath
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-circle-fill" viewBox="0 0 16 16">
|
|
||||||
<circle cx="8" cy="8" r="8"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 168 B |
@@ -568,10 +568,6 @@ Partial Public Class frmEnvelopeEditor
|
|||||||
RibbonPageGroupAddSignature_Enabled()
|
RibbonPageGroupAddSignature_Enabled()
|
||||||
End Sub
|
End Sub
|
||||||
Dim CellValueChanged As Boolean = False
|
Dim CellValueChanged As Boolean = False
|
||||||
Private Sub ViewReceivers_ColumnPositionChanged(sender As Object, e As EventArgs) Handles ViewReceivers.ColumnPositionChanged
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
|
||||||
Private Sub ViewReceivers_CellValueChanged(sender As Object, e As Views.Base.CellValueChangedEventArgs) Handles ViewReceivers.CellValueChanged
|
Private Sub ViewReceivers_CellValueChanged(sender As Object, e As Views.Base.CellValueChangedEventArgs) Handles ViewReceivers.CellValueChanged
|
||||||
|
|
||||||
If e.Column.FieldName = COL_EMAIL And CellValueChanged = False Then
|
If e.Column.FieldName = COL_EMAIL And CellValueChanged = False Then
|
||||||
@@ -587,17 +583,22 @@ Partial Public Class frmEnvelopeEditor
|
|||||||
Dim oEmailAdress As String = DirectCast(e.Value.ToString.ToLower, String)
|
Dim oEmailAdress As String = DirectCast(e.Value.ToString.ToLower, String)
|
||||||
oEmailAdress = Trim(oEmailAdress)
|
oEmailAdress = Trim(oEmailAdress)
|
||||||
If IsValidEmailAddress(oEmailAdress) = True Then
|
If IsValidEmailAddress(oEmailAdress) = True Then
|
||||||
|
Dim oAccessCode As String = ""
|
||||||
Dim oLastName As String = Controller.GetLastNameByEmailAdress(oEmailAdress)
|
Dim oLastName As String = Controller.GetLastNameByEmailAdress(oEmailAdress)
|
||||||
Dim oAccessCode As String = Helpers.GetAccessCode()
|
'oAccessCode = Helpers.GetAccessCode()
|
||||||
Dim oPhoneNumber As String = Controller.GetLastPhoneByEmailAdress(oEmailAdress)
|
Dim oPhoneNumber As String = Controller.GetLastPhoneByEmailAdress(oEmailAdress)
|
||||||
ViewReceivers.SetRowCellValue(e.RowHandle, ViewReceivers.Columns.Item(COL_EMAIL), oEmailAdress)
|
ViewReceivers.SetRowCellValue(e.RowHandle, ViewReceivers.Columns.Item(COL_EMAIL), oEmailAdress)
|
||||||
ViewReceivers.SetRowCellValue(e.RowHandle, ViewReceivers.Columns.Item(COL_NAME), oLastName)
|
ViewReceivers.SetRowCellValue(e.RowHandle, ViewReceivers.Columns.Item(COL_NAME), oLastName)
|
||||||
ViewReceivers.SetRowCellValue(e.RowHandle, ViewReceivers.Columns.Item(COL_CODE), oAccessCode)
|
CheckAccesscode(e.RowHandle, oAccessCode)
|
||||||
|
' ViewReceivers.SetRowCellValue(e.RowHandle, ViewReceivers.Columns.Item(COL_CODE), oAccessCode)
|
||||||
If Envelope.TFA_Enabled AndAlso DEF_TF_ENABLED_WITH_PHONE Then
|
If Envelope.TFA_Enabled AndAlso DEF_TF_ENABLED_WITH_PHONE Then
|
||||||
ViewReceivers.SetRowCellValue(e.RowHandle, ViewReceivers.Columns.Item(COL_PHONE), oPhoneNumber)
|
ViewReceivers.SetRowCellValue(e.RowHandle, ViewReceivers.Columns.Item(COL_PHONE), oPhoneNumber)
|
||||||
End If
|
End If
|
||||||
|
If ViewReceivers.GetRowCellValue(e.RowHandle, ViewReceivers.Columns.Item(COL_CODE)) = String.Empty Then
|
||||||
|
CheckAccesscode(e.RowHandle, oAccessCode)
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
Dim oMsg = Resources.Envelope.Error_email_Validation
|
Dim oMsg = Resources.Envelope.Error_email_Validation
|
||||||
oMsg = oMsg.Replace("@Mail", oEmailAdress)
|
oMsg = oMsg.Replace("@Mail", oEmailAdress)
|
||||||
MsgBox(oMsg, MsgBoxStyle.Exclamation, Text)
|
MsgBox(oMsg, MsgBoxStyle.Exclamation, Text)
|
||||||
ViewReceivers.DeleteRow(ViewReceivers.FocusedRowHandle)
|
ViewReceivers.DeleteRow(ViewReceivers.FocusedRowHandle)
|
||||||
@@ -620,6 +621,12 @@ Partial Public Class frmEnvelopeEditor
|
|||||||
CellValueChanged = False
|
CellValueChanged = False
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
Private Function CheckAccesscode(pRowHandle As Integer, pAccessCode As String) As Boolean
|
||||||
|
If pAccessCode = "" Then
|
||||||
|
pAccessCode = Helpers.GetAccessCode()
|
||||||
|
ViewReceivers.SetRowCellValue(pRowHandle, ViewReceivers.Columns.Item(COL_CODE), pAccessCode)
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
Private Function IsValidEmailAddress(pEmailAddress As String) As Boolean
|
Private Function IsValidEmailAddress(pEmailAddress As String) As Boolean
|
||||||
Try
|
Try
|
||||||
If pEmailAddress.Contains("@") Then
|
If pEmailAddress.Contains("@") Then
|
||||||
|
|||||||
@@ -282,6 +282,7 @@
|
|||||||
'
|
'
|
||||||
'frmFieldEditor
|
'frmFieldEditor
|
||||||
'
|
'
|
||||||
|
Me.Appearance.Options.UseFont = True
|
||||||
resources.ApplyResources(Me, "$this")
|
resources.ApplyResources(Me, "$this")
|
||||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||||
Me.Controls.Add(Me.SplitContainerControl1)
|
Me.Controls.Add(Me.SplitContainerControl1)
|
||||||
|
|||||||
@@ -123,7 +123,7 @@
|
|||||||
</data>
|
</data>
|
||||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
<data name="SplitContainerControl1.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="SplitContainerControl1.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>0, 132</value>
|
<value>0, 59</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ThumbnailEx2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
<data name="ThumbnailEx2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||||
<value>Fill</value>
|
<value>Fill</value>
|
||||||
@@ -132,7 +132,7 @@
|
|||||||
<value>0, 0</value>
|
<value>0, 0</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ThumbnailEx2.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="ThumbnailEx2.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>199, 526</value>
|
<value>199, 600</value>
|
||||||
</data>
|
</data>
|
||||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
<data name="ThumbnailEx2.TabIndex" type="System.Int32, mscorlib">
|
<data name="ThumbnailEx2.TabIndex" type="System.Int32, mscorlib">
|
||||||
@@ -142,7 +142,7 @@
|
|||||||
<value>ThumbnailEx2</value>
|
<value>ThumbnailEx2</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>ThumbnailEx2.Type" xml:space="preserve">
|
<data name=">>ThumbnailEx2.Type" xml:space="preserve">
|
||||||
<value>GdPicture14.ThumbnailEx, GdPicture.NET.14, Version=14.1.0.152, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb</value>
|
<value>GdPicture14.ThumbnailEx, GdPicture.NET.14, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>ThumbnailEx2.Parent" xml:space="preserve">
|
<data name=">>ThumbnailEx2.Parent" xml:space="preserve">
|
||||||
<value>SplitContainerControl1.Panel1</value>
|
<value>SplitContainerControl1.Panel1</value>
|
||||||
@@ -172,7 +172,7 @@
|
|||||||
<value>0, 0</value>
|
<value>0, 0</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="DocumentViewer1.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="DocumentViewer1.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>916, 526</value>
|
<value>917, 600</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="DocumentViewer1.TabIndex" type="System.Int32, mscorlib">
|
<data name="DocumentViewer1.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>3</value>
|
<value>3</value>
|
||||||
@@ -181,7 +181,7 @@
|
|||||||
<value>DocumentViewer1</value>
|
<value>DocumentViewer1</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>DocumentViewer1.Type" xml:space="preserve">
|
<data name=">>DocumentViewer1.Type" xml:space="preserve">
|
||||||
<value>DigitalData.Controls.DocumentViewer.DocumentViewer, DigitalData.Controls.DocumentViewer, Version=1.9.2.0, Culture=neutral, PublicKeyToken=null</value>
|
<value>DigitalData.Controls.DocumentViewer.DocumentViewer, DigitalData.Controls.DocumentViewer, Version=1.9.8.0, Culture=neutral, PublicKeyToken=null</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>DocumentViewer1.Parent" xml:space="preserve">
|
<data name=">>DocumentViewer1.Parent" xml:space="preserve">
|
||||||
<value>SplitContainerControl1.Panel2</value>
|
<value>SplitContainerControl1.Panel2</value>
|
||||||
@@ -205,7 +205,7 @@
|
|||||||
<value>1</value>
|
<value>1</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SplitContainerControl1.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="SplitContainerControl1.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>1125, 526</value>
|
<value>1126, 600</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SplitContainerControl1.TabIndex" type="System.Int32, mscorlib">
|
<data name="SplitContainerControl1.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>15</value>
|
<value>15</value>
|
||||||
@@ -397,7 +397,7 @@
|
|||||||
<value>Combo</value>
|
<value>Combo</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ribbonControl1.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="ribbonControl1.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>1125, 132</value>
|
<value>1126, 88</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>ribbonControl1.Name" xml:space="preserve">
|
<data name=">>ribbonControl1.Name" xml:space="preserve">
|
||||||
<value>ribbonControl1</value>
|
<value>ribbonControl1</value>
|
||||||
@@ -427,7 +427,7 @@
|
|||||||
<value>0, 0</value>
|
<value>0, 0</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="barDockControlTop.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="barDockControlTop.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>1125, 0</value>
|
<value>1126, 0</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>barDockControlTop.Name" xml:space="preserve">
|
<data name=">>barDockControlTop.Name" xml:space="preserve">
|
||||||
<value>barDockControlTop</value>
|
<value>barDockControlTop</value>
|
||||||
@@ -445,10 +445,10 @@
|
|||||||
<value>Bottom</value>
|
<value>Bottom</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="barDockControlBottom.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="barDockControlBottom.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>0, 658</value>
|
<value>0, 659</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="barDockControlBottom.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="barDockControlBottom.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>1125, 0</value>
|
<value>1126, 0</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>barDockControlBottom.Name" xml:space="preserve">
|
<data name=">>barDockControlBottom.Name" xml:space="preserve">
|
||||||
<value>barDockControlBottom</value>
|
<value>barDockControlBottom</value>
|
||||||
@@ -469,7 +469,7 @@
|
|||||||
<value>0, 0</value>
|
<value>0, 0</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="barDockControlLeft.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="barDockControlLeft.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>0, 658</value>
|
<value>0, 659</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>barDockControlLeft.Name" xml:space="preserve">
|
<data name=">>barDockControlLeft.Name" xml:space="preserve">
|
||||||
<value>barDockControlLeft</value>
|
<value>barDockControlLeft</value>
|
||||||
@@ -487,10 +487,10 @@
|
|||||||
<value>Right</value>
|
<value>Right</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="barDockControlRight.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="barDockControlRight.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>1125, 0</value>
|
<value>1126, 0</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="barDockControlRight.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="barDockControlRight.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>0, 658</value>
|
<value>0, 659</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>barDockControlRight.Name" xml:space="preserve">
|
<data name=">>barDockControlRight.Name" xml:space="preserve">
|
||||||
<value>barDockControlRight</value>
|
<value>barDockControlRight</value>
|
||||||
@@ -511,7 +511,7 @@
|
|||||||
<value>6, 13</value>
|
<value>6, 13</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>1125, 658</value>
|
<value>1689, 988</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="$this.Font" type="System.Drawing.Font, System.Drawing">
|
<data name="$this.Font" type="System.Drawing.Font, System.Drawing">
|
||||||
<value>Segoe UI, 8.25pt</value>
|
<value>Segoe UI, 8.25pt</value>
|
||||||
|
|||||||
@@ -74,25 +74,32 @@ Partial Public Class frmFieldEditor
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub InitializeViewer()
|
Private Sub InitializeViewer()
|
||||||
DocumentViewer1.Init(LogConfig, MS_GDPICTUREKEY, New DigitalData.Controls.DocumentViewer.DocumentViewer.ToolbarSettings With {
|
Try
|
||||||
.ShowFlipButton = False,
|
DocumentViewer1.Init(LogConfig, MS_GDPICTUREKEY, New DigitalData.Controls.DocumentViewer.DocumentViewer.ToolbarSettings With {
|
||||||
.ShowPrintButton = False,
|
.ShowFlipButton = False,
|
||||||
.ShowRotateButton = False,
|
.ShowPrintButton = False,
|
||||||
.ShowSettingButton = False
|
.ShowRotateButton = False,
|
||||||
})
|
.ShowSettingButton = False
|
||||||
DocumentViewer1.LoadFile(Document.Filepath)
|
})
|
||||||
|
DocumentViewer1.LoadFile(Document.Filepath)
|
||||||
|
|
||||||
If DocumentViewer1.PdfViewer IsNot Nothing Then
|
If DocumentViewer1.PdfViewer IsNot Nothing Then
|
||||||
GDViewer = DocumentViewer1.PdfViewer
|
GDViewer = DocumentViewer1.PdfViewer
|
||||||
AddHandler GDViewer.BeforeAnnotationAddedByUser, AddressOf Viewer_BeforeAnnotationAddedByUser
|
AddHandler GDViewer.BeforeAnnotationAddedByUser, AddressOf Viewer_BeforeAnnotationAddedByUser
|
||||||
AddHandler GDViewer.AnnotationAddedByUser, AddressOf Viewer_AnnotationAddedByUser
|
AddHandler GDViewer.AnnotationAddedByUser, AddressOf Viewer_AnnotationAddedByUser
|
||||||
AddHandler GDViewer.AnnotationMoved, AddressOf Viewer_AnnotationMoved
|
AddHandler GDViewer.AnnotationMoved, AddressOf Viewer_AnnotationMoved
|
||||||
|
|
||||||
Manager = GDViewer.GetAnnotationManager()
|
Manager = GDViewer.GetAnnotationManager()
|
||||||
Manager.InitFromGdViewer(GDViewer)
|
Manager.InitFromGdViewer(GDViewer)
|
||||||
Else
|
Else
|
||||||
|
Logger.Warn("Viewer could not be initialized!")
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
Logger.Warn("Viewer could not be initialized!")
|
Logger.Warn("Viewer could not be initialized!")
|
||||||
End If
|
Logger.Error(ex)
|
||||||
|
MsgBox("Viewer could not be initialized!" & vbNewLine & ex.Message)
|
||||||
|
End Try
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub Viewer_AnnotationMoved(AnnotationIdx As Integer)
|
Private Sub Viewer_AnnotationMoved(AnnotationIdx As Integer)
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="BouncyCastle.Cryptography" version="2.5.0" targetFramework="net462" />
|
<package id="BouncyCastle.Cryptography" version="2.5.0" targetFramework="net462" />
|
||||||
|
<package id="DigitalData.Controls.DocumentViewer" version="1.9.8" targetFramework="net462" />
|
||||||
<package id="DigitalData.Modules.Base" version="1.3.8" targetFramework="net462" />
|
<package id="DigitalData.Modules.Base" version="1.3.8" targetFramework="net462" />
|
||||||
<package id="DigitalData.Modules.Config" version="1.3.0" targetFramework="net462" />
|
<package id="DigitalData.Modules.Config" version="1.3.0" targetFramework="net462" />
|
||||||
<package id="DigitalData.Modules.Database" version="2.3.5.4" targetFramework="net462" />
|
<package id="DigitalData.Modules.Database" version="2.3.5.4" targetFramework="net462" />
|
||||||
@@ -11,7 +12,6 @@
|
|||||||
<package id="DocumentFormat.OpenXml.Framework" version="3.2.0" targetFramework="net462" />
|
<package id="DocumentFormat.OpenXml.Framework" version="3.2.0" targetFramework="net462" />
|
||||||
<package id="EntityFramework" version="6.4.4" targetFramework="net462" />
|
<package id="EntityFramework" version="6.4.4" targetFramework="net462" />
|
||||||
<package id="EntityFramework.Firebird" version="6.4.0" targetFramework="net462" />
|
<package id="EntityFramework.Firebird" version="6.4.0" targetFramework="net462" />
|
||||||
<package id="EnvelopeGenerator.Common" version="2.4.2" targetFramework="net462" />
|
|
||||||
<package id="FirebirdSql.Data.FirebirdClient" version="7.5.0" targetFramework="net462" />
|
<package id="FirebirdSql.Data.FirebirdClient" version="7.5.0" targetFramework="net462" />
|
||||||
<package id="GdPicture" version="14.3.3" targetFramework="net462" />
|
<package id="GdPicture" version="14.3.3" targetFramework="net462" />
|
||||||
<package id="GdPicture.runtimes.windows" version="14.3.3" targetFramework="net462" />
|
<package id="GdPicture.runtimes.windows" version="14.3.3" targetFramework="net462" />
|
||||||
|
|||||||
@@ -1,16 +1,32 @@
|
|||||||
using EnvelopeGenerator.Application.Contracts.Repositories;
|
using EnvelopeGenerator.Application.Contracts.Repositories;
|
||||||
using EnvelopeGenerator.Application.Extensions;
|
|
||||||
using EnvelopeGenerator.Infrastructure.Repositories;
|
using EnvelopeGenerator.Infrastructure.Repositories;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Infrastructure;
|
namespace EnvelopeGenerator.Infrastructure;
|
||||||
|
|
||||||
public static class DIExtensions
|
public static class DIExtensions
|
||||||
{
|
{
|
||||||
public static IServiceCollection AddEnvelopeGeneratorRepositories(this IServiceCollection services)
|
/// <summary>
|
||||||
|
/// Registers the required repositories for the Envelope Generator service to the given <see cref="IServiceCollection"/>.
|
||||||
|
/// This method adds the repositories for various envelope-related entities, such as configuration, document receivers, envelopes, and users,
|
||||||
|
/// as scoped services to the dependency injection container. Optionally, it can also configure the <see cref="EGDbContext"/>
|
||||||
|
/// with the provided database context options if specified.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="services">The <see cref="IServiceCollection"/> to which the services are added.</param>
|
||||||
|
/// <param name="dbContextOptions">An optional action to configure the <see cref="DbContextOptionsBuilder"/> for the <see cref="EGDbContext"/>.
|
||||||
|
/// If not provided, the <see cref="EGDbContext"/> will not be configured.</param>
|
||||||
|
/// <returns>The updated <see cref="IServiceCollection"/> with the added repository services.</returns>
|
||||||
|
/// <remarks>
|
||||||
|
/// This method ensures that the repositories are registered as scoped services, meaning that a new instance of each repository
|
||||||
|
/// will be created per HTTP request (or per scope) within the dependency injection container.
|
||||||
|
/// </remarks>
|
||||||
|
public static IServiceCollection AddEnvelopeGeneratorRepositories(this IServiceCollection services, Action<DbContextOptionsBuilder>? dbContextOptions = null)
|
||||||
{
|
{
|
||||||
|
if(dbContextOptions is not null)
|
||||||
|
services.AddDbContext<EGDbContext>(dbContextOptions);
|
||||||
|
|
||||||
services.TryAddScoped<IConfigRepository, ConfigRepository>();
|
services.TryAddScoped<IConfigRepository, ConfigRepository>();
|
||||||
services.TryAddScoped<IDocumentReceiverElementRepository, DocumentReceiverElementRepository>();
|
services.TryAddScoped<IDocumentReceiverElementRepository, DocumentReceiverElementRepository>();
|
||||||
services.TryAddScoped<IEnvelopeDocumentRepository, EnvelopeDocumentRepository>();
|
services.TryAddScoped<IEnvelopeDocumentRepository, EnvelopeDocumentRepository>();
|
||||||
@@ -30,8 +46,4 @@ public static class DIExtensions
|
|||||||
|
|
||||||
return services;
|
return services;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IServiceCollection AddEnvelopeGenerator(this IServiceCollection services, IConfiguration configuration) => services
|
|
||||||
.AddEnvelopeGeneratorRepositories()
|
|
||||||
.AddEnvelopeGeneratorServices(configuration);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,5 +7,10 @@ Public Class Config
|
|||||||
Public Property Debug As Boolean = False
|
Public Property Debug As Boolean = False
|
||||||
Public Property IntervalInMin As Integer = 1
|
Public Property IntervalInMin As Integer = 1
|
||||||
|
|
||||||
Public Property IgnoredLabels As List(Of String) = New List(Of String) From {"Date", "Datum", "ZIP", "PLZ", "Place", "Ort"}
|
Public Property IgnoredLabels As List(Of String) = New List(Of String) From {
|
||||||
|
"Date", "Datum",
|
||||||
|
"ZIP", "PLZ",
|
||||||
|
"Place", "Ort",
|
||||||
|
"Position", "Stellung"
|
||||||
|
}
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -1,12 +1,7 @@
|
|||||||
Imports System.Timers
|
Imports System.IO
|
||||||
Imports System.IO
|
|
||||||
Imports System.ComponentModel
|
|
||||||
Imports DigitalData.Modules.Base
|
|
||||||
Imports DigitalData.Modules.Logging
|
Imports DigitalData.Modules.Logging
|
||||||
Imports DigitalData.Modules.Database
|
Imports DigitalData.Modules.Database
|
||||||
Imports DigitalData.Modules.Messaging
|
|
||||||
Imports DigitalData.Modules.Config
|
Imports DigitalData.Modules.Config
|
||||||
Imports GdPicture.Internal.WPF
|
|
||||||
|
|
||||||
Public Class Service
|
Public Class Service
|
||||||
Private Logger As Logger
|
Private Logger As Logger
|
||||||
|
|||||||
@@ -0,0 +1,52 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
|
||||||
|
<IsPackable>false</IsPackable>
|
||||||
|
<IsTestProject>true</IsTestProject>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Remove="appsettings.json" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="appsettings.json">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
|
||||||
|
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||||
|
</Content>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="coverlet.collector" Version="6.0.0" />
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.20" />
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="7.0.20" />
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.20" />
|
||||||
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" />
|
||||||
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
|
||||||
|
<PackageReference Include="NUnit" Version="3.14.0" />
|
||||||
|
<PackageReference Include="NUnit.Analyzers" Version="3.9.0" />
|
||||||
|
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
|
||||||
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.2" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\EnvelopeGenerator.Application\EnvelopeGenerator.Application.csproj" />
|
||||||
|
<ProjectReference Include="..\EnvelopeGenerator.Infrastructure\EnvelopeGenerator.Infrastructure.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Using Include="NUnit.Framework" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Update="annotations.json">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
40
EnvelopeGenerator.Tests.Application/Mock.cs
Normal file
40
EnvelopeGenerator.Tests.Application/Mock.cs
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
using Microsoft.Extensions.Hosting;
|
||||||
|
using EnvelopeGenerator.Application.Extensions;
|
||||||
|
using EnvelopeGenerator.Infrastructure;
|
||||||
|
using Microsoft.Extensions.Configuration;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using EnvelopeGenerator.Application.Services;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Tests.Application;
|
||||||
|
|
||||||
|
public class Mock
|
||||||
|
{
|
||||||
|
public static IHost CreateHost(Action<HostApplicationBuilder>? builderOptions = null, string configPath = "appsettings.json", bool useRealDb = false, params string[] args)
|
||||||
|
{
|
||||||
|
var builder = Host.CreateApplicationBuilder(args.Any() ? args : null);
|
||||||
|
var config = builder.Configuration;
|
||||||
|
builder.Configuration.AddJsonFile(configPath, optional: true, reloadOnChange: true);
|
||||||
|
|
||||||
|
builder.Services
|
||||||
|
.AddEnvelopeGeneratorRepositories(opt =>
|
||||||
|
{
|
||||||
|
if (useRealDb)
|
||||||
|
{
|
||||||
|
var connStr = config.GetConnectionString("Default")
|
||||||
|
?? throw new InvalidOperationException("There is no default connection string in appsettings.json.");
|
||||||
|
opt.UseSqlServer(connStr);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
opt.UseInMemoryDatabase("MockDB");
|
||||||
|
})
|
||||||
|
.AddEnvelopeGeneratorServices(builder.Configuration)
|
||||||
|
.AddScoped<DocumentStatusService>();
|
||||||
|
|
||||||
|
builderOptions?.Invoke(builder);
|
||||||
|
|
||||||
|
var host = builder.Build();
|
||||||
|
|
||||||
|
return host;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
using Microsoft.Extensions.Hosting;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Tests.Application.Services;
|
||||||
|
|
||||||
|
[TestFixture]
|
||||||
|
public class DocumentStatusServiceTests
|
||||||
|
{
|
||||||
|
private IHost _host;
|
||||||
|
|
||||||
|
[SetUp]
|
||||||
|
public void SetUp()
|
||||||
|
{
|
||||||
|
_host = Mock.CreateHost(useRealDb: true);
|
||||||
|
}
|
||||||
|
|
||||||
|
[TearDown]
|
||||||
|
public void TearDown()
|
||||||
|
{
|
||||||
|
_host.StopAsync();
|
||||||
|
_host.Dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
208
EnvelopeGenerator.Tests.Application/appsettings.json
Normal file
208
EnvelopeGenerator.Tests.Application/appsettings.json
Normal file
@@ -0,0 +1,208 @@
|
|||||||
|
{
|
||||||
|
"DiPMode": false, //Please be careful when enabling Development in Production (DiP) mode. It allows Swagger and test controllers to be enabled in a production environment.
|
||||||
|
"EnableSwagger": true,
|
||||||
|
"EnableTestControllers": true,
|
||||||
|
"DetailedErrors": true,
|
||||||
|
"Logging": {
|
||||||
|
"LogLevel": {
|
||||||
|
"Default": "Warning",
|
||||||
|
"Microsoft": "Warning",
|
||||||
|
"Microsoft.Hosting.Lifetime": "Information",
|
||||||
|
"Microsoft.AspNetCore.Hosting.Diagnostics": "Warning"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ConnectionStrings": {
|
||||||
|
"Default": "Server=SDD-VMP04-SQL17\\DD_DEVELOP01;Database=DD_ECM;User Id=sa;Password=dd;Encrypt=false;TrustServerCertificate=True;"
|
||||||
|
},
|
||||||
|
"PSPDFKitLicenseKey": "SXCtGGY9XA-31OGUXQK-r7c6AkdLGPm2ljuyDr1qu0kkhLvydg-Do-fxpNUF4Rq3fS_xAnZRNFRHbXpE6sQ2BMcCSVTcXVJO6tPviexjpiT-HnrDEySlUERJnnvh-tmeOWprxS6BySPnSILkmaVQtUfOIUS-cUbvvEYHTvQBKbSF8di4XHQFyfv49ihr51axm3NVV3AXwh2EiKL5C5XdqBZ4sQ4O7vXBjM2zvxdPxlxdcNYmiU83uAzw7B83O_jubPzya4CdUHh_YH7Nlp2gP56MeG1Sw2JhMtfG3Rj14Sg4ctaeL9p6AEWca5dDjJ2li5tFIV2fQSsw6A_cowLu0gtMm5i8IfJXeIcQbMC2-0wGv1oe9hZYJvFMdzhTM_FiejM0agemxt3lJyzuyP8zbBSOgp7Si6A85krLWPZptyZBTG7pp7IHboUHfPMxCXqi-zMsqewOJtQBE2mjntU-lPryKnssOpMPfswwQX7QSkJYV5EMqNmEhQX6mEkp2wcqFzMC7bJQew1aO4pOpvChUaMvb1vgRek0HxLag0nwQYX2YrYGh7F_xXJs-8HNwJe8H0-eW4x4faayCgM5rB5772CCCsD9ThZcvXFrjNHHLGJ8WuBUFm6LArvSfFQdii_7j-_sqHMpeKZt26NFgivj1A==",
|
||||||
|
"Content-Security-Policy": [ // The first format parameter {0} will be replaced by the nonce value.
|
||||||
|
"default-src 'self'",
|
||||||
|
"script-src 'self' 'nonce-{0}' 'unsafe-eval'",
|
||||||
|
"style-src 'self' 'unsafe-inline' https://fonts.googleapis.com:*",
|
||||||
|
"img-src 'self' data: https: blob:",
|
||||||
|
"font-src 'self' https://fonts.gstatic.com:*",
|
||||||
|
"connect-src 'self' https://nominatim.openstreetmap.org:* http://localhost:* https://localhost:* ws://localhost:* wss://localhost:* blob:",
|
||||||
|
"frame-src 'self'",
|
||||||
|
"media-src 'self'",
|
||||||
|
"object-src 'self'"
|
||||||
|
],
|
||||||
|
"AllowedOrigins": [ "https://localhost:7202", "https://digitale.unterschrift.wisag.de/" ],
|
||||||
|
"NLog": {
|
||||||
|
"throwConfigExceptions": true,
|
||||||
|
"variables": {
|
||||||
|
"logDirectory": "E:\\LogFiles\\Digital Data\\signFlow",
|
||||||
|
"logFileNamePrefix": "${shortdate}-ECM.EnvelopeGenerator.Web"
|
||||||
|
},
|
||||||
|
"targets": {
|
||||||
|
"infoLogs": {
|
||||||
|
"type": "File",
|
||||||
|
"fileName": "${logDirectory}\\${logFileNamePrefix}-Info.log",
|
||||||
|
"maxArchiveDays": 30
|
||||||
|
},
|
||||||
|
"errorLogs": {
|
||||||
|
"type": "File",
|
||||||
|
"fileName": "${logDirectory}\\${logFileNamePrefix}-Error.log",
|
||||||
|
"maxArchiveDays": 30
|
||||||
|
},
|
||||||
|
"criticalLogs": {
|
||||||
|
"type": "File",
|
||||||
|
"fileName": "${logDirectory}\\${logFileNamePrefix}-Critical.log",
|
||||||
|
"maxArchiveDays": 30
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// Trace, Debug, Info, Warn, Error and *Fatal*
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"logger": "*",
|
||||||
|
"minLevel": "Info",
|
||||||
|
"maxLevel": "Warn",
|
||||||
|
"writeTo": "infoLogs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"logger": "*",
|
||||||
|
"level": "Error",
|
||||||
|
"writeTo": "errorLogs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"logger": "*",
|
||||||
|
"level": "Fatal",
|
||||||
|
"writeTo": "criticalLogs"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ContactLink": {
|
||||||
|
"Label": "Kontakt",
|
||||||
|
"Href": "https://digitaldata.works/",
|
||||||
|
"HrefLang": "de",
|
||||||
|
"Target": "_blank",
|
||||||
|
"Title": "Digital Data GmbH"
|
||||||
|
},
|
||||||
|
/* Resx naming format is -> Resource.language.resx (eg: Resource.de_DE.resx).
|
||||||
|
To add a new language, first you should write the required resx file.
|
||||||
|
first is the default culture name. */
|
||||||
|
"Cultures": [
|
||||||
|
{
|
||||||
|
"Language": "de-DE",
|
||||||
|
"FIClass": "fi-de"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Language": "en-US",
|
||||||
|
"FIClass": "fi-us"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"DisableMultiLanguage": false,
|
||||||
|
"Regexes": [
|
||||||
|
{
|
||||||
|
"Pattern": "/^\\p{L}+(?:([\\ \\-\\']|(\\.\\ ))\\p{L}+)*$/u",
|
||||||
|
"Name": "City",
|
||||||
|
"Platforms": [ ".NET" ]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Pattern": "/^[a-zA-Z\\u0080-\\u024F]+(?:([\\ \\-\\']|(\\.\\ ))[a-zA-Z\\u0080-\\u024F]+)*$/",
|
||||||
|
"Name": "City",
|
||||||
|
"Platforms": [ "javascript" ]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"CustomImages": {
|
||||||
|
"App": {
|
||||||
|
"Src": "/img/DD_signFLOW_LOGO.png",
|
||||||
|
"Classes": {
|
||||||
|
"Main": "signFlow-logo"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Company": {
|
||||||
|
"Src": "/img/digital_data.svg",
|
||||||
|
"Classes": {
|
||||||
|
"Show": "dd-show-logo",
|
||||||
|
"Locked": "dd-locked-logo"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"DispatcherParams": {
|
||||||
|
"SendingProfile": 1,
|
||||||
|
"AddedWho": "DDEnvelopGenerator",
|
||||||
|
"ReminderTypeId": 202377,
|
||||||
|
"EmailAttmt1": ""
|
||||||
|
},
|
||||||
|
"MailParams": {
|
||||||
|
"Placeholders": {
|
||||||
|
"[NAME_PORTAL]": "signFlow",
|
||||||
|
"[SIGNATURE_TYPE]": "signieren",
|
||||||
|
"[REASON]": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"GtxMessagingParams": {
|
||||||
|
"Uri": "https://rest.gtx-messaging.net",
|
||||||
|
"Path": "smsc/sendsms/f566f7e5-bdf2-4a9a-bf52-ed88215a432e/json",
|
||||||
|
"Headers": {},
|
||||||
|
"QueryParams": {
|
||||||
|
"from": "signFlow"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"TFARegParams": {
|
||||||
|
"TimeLimit": "00:30:00"
|
||||||
|
},
|
||||||
|
"DbTriggerParams": {
|
||||||
|
"Envelope": [ "TBSIG_ENVELOPE_HISTORY_AFT_INS" ],
|
||||||
|
"EnvelopeHistory": [ "TBSIG_ENVELOPE_HISTORY_AFT_INS" ],
|
||||||
|
"EmailOut": [ "TBEMLP_EMAIL_OUT_AFT_INS", "TBEMLP_EMAIL_OUT_AFT_UPD" ],
|
||||||
|
"EnvelopeReceiverReadOnly": [ "TBSIG_ENVELOPE_RECEIVER_READ_ONLY_UPD" ],
|
||||||
|
"Receiver": []
|
||||||
|
},
|
||||||
|
"MainPageTitle": null,
|
||||||
|
"AnnotationParams": {
|
||||||
|
"DefaultAnnotation": {
|
||||||
|
"Width": 1,
|
||||||
|
"Height": 0.5,
|
||||||
|
"MarginTop": 1
|
||||||
|
},
|
||||||
|
"Annotations": [
|
||||||
|
{
|
||||||
|
"Name": "Signature",
|
||||||
|
"MarginTop": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "PositionLabel",
|
||||||
|
"VerBoundAnnotName": "Signature",
|
||||||
|
"WidthRatio": 1.2,
|
||||||
|
"HeightRatio": 0.5,
|
||||||
|
"MarginTopRatio": 0.22
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "Position",
|
||||||
|
"VerBoundAnnotName": "PositionLabel",
|
||||||
|
"WidthRatio": 1.2,
|
||||||
|
"HeightRatio": 0.5,
|
||||||
|
"MarginTopRatio": -0.05
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "CityLabel",
|
||||||
|
"VerBoundAnnotName": "Position",
|
||||||
|
"WidthRatio": 1.2,
|
||||||
|
"HeightRatio": 0.5,
|
||||||
|
"MarginTopRatio": 0.05
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "City",
|
||||||
|
"VerBoundAnnotName": "CityLabel",
|
||||||
|
"WidthRatio": 1.2,
|
||||||
|
"HeightRatio": 0.5,
|
||||||
|
"MarginTopRatio": -0.05
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "DateLabel",
|
||||||
|
"VerBoundAnnotName": "City",
|
||||||
|
"WidthRatio": 1.55,
|
||||||
|
"HeightRatio": 0.5,
|
||||||
|
"MarginTopRatio": 0.05
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "Date",
|
||||||
|
"VerBoundAnnotName": "DateLabel",
|
||||||
|
"WidthRatio": 1.55,
|
||||||
|
"HeightRatio": 0.5,
|
||||||
|
"MarginTopRatio": -0.1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
23
EnvelopeGenerator.Web/Controllers/ConfigController.cs
Normal file
23
EnvelopeGenerator.Web/Controllers/ConfigController.cs
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
using EnvelopeGenerator.Web.Models;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Microsoft.Extensions.Options;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Web.Controllers;
|
||||||
|
|
||||||
|
[Route("api/[controller]")]
|
||||||
|
[ApiController]
|
||||||
|
public class ConfigController : ControllerBase
|
||||||
|
{
|
||||||
|
private readonly AnnotationParams _annotParams;
|
||||||
|
|
||||||
|
public ConfigController(IOptionsMonitor<AnnotationParams> annotationParamsOptions)
|
||||||
|
{
|
||||||
|
_annotParams = annotationParamsOptions.CurrentValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpGet("Annotations")]
|
||||||
|
public IActionResult GetAnnotationParams()
|
||||||
|
{
|
||||||
|
return Ok(_annotParams.AnnotationDictionary);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<PackageId>EnvelopeGenerator.Web</PackageId>
|
<PackageId>EnvelopeGenerator.Web</PackageId>
|
||||||
<Version>3.0.0</Version>
|
<Version>3.1.1</Version>
|
||||||
<Authors>Digital Data GmbH</Authors>
|
<Authors>Digital Data GmbH</Authors>
|
||||||
<Company>Digital Data GmbH</Company>
|
<Company>Digital Data GmbH</Company>
|
||||||
<Product>EnvelopeGenerator.Web</Product>
|
<Product>EnvelopeGenerator.Web</Product>
|
||||||
@@ -13,8 +13,8 @@
|
|||||||
<PackageTags>digital data envelope generator web</PackageTags>
|
<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>
|
<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>
|
<ApplicationIcon>Assets\icon.ico</ApplicationIcon>
|
||||||
<AssemblyVersion>3.0.0</AssemblyVersion>
|
<AssemblyVersion>3.1.1</AssemblyVersion>
|
||||||
<FileVersion>3.0.0</FileVersion>
|
<FileVersion>3.1.1</FileVersion>
|
||||||
<Copyright>Copyright © 2025 Digital Data GmbH. All rights reserved.</Copyright>
|
<Copyright>Copyright © 2025 Digital Data GmbH. All rights reserved.</Copyright>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
@@ -2104,6 +2104,9 @@
|
|||||||
<PackageReference Include="DigitalData.Core.Abstractions" Version="2.2.1" />
|
<PackageReference Include="DigitalData.Core.Abstractions" Version="2.2.1" />
|
||||||
<PackageReference Include="DigitalData.Core.API" Version="2.0.1" />
|
<PackageReference Include="DigitalData.Core.API" Version="2.0.1" />
|
||||||
<PackageReference Include="DigitalData.EmailProfilerDispatcher" Version="2.0.0" />
|
<PackageReference Include="DigitalData.EmailProfilerDispatcher" Version="2.0.0" />
|
||||||
|
<PackageReference Include="DigitalData.Modules.Base" Version="1.3.8" />
|
||||||
|
<PackageReference Include="DigitalData.Modules.Config" Version="1.3.0" />
|
||||||
|
<PackageReference Include="DigitalData.Modules.Database" Version="2.3.5.4" />
|
||||||
<PackageReference Include="HtmlSanitizer" Version="8.0.865" />
|
<PackageReference Include="HtmlSanitizer" Version="8.0.865" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.4" />
|
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.4" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.16" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.16" />
|
||||||
@@ -2142,18 +2145,6 @@
|
|||||||
<Reference Include="DevExpress.Data.v21.2">
|
<Reference Include="DevExpress.Data.v21.2">
|
||||||
<HintPath>D:\ProgramFiles\DevExpress 21.2\Components\Bin\Framework\DevExpress.Data.v21.2.dll</HintPath>
|
<HintPath>D:\ProgramFiles\DevExpress 21.2\Components\Bin\Framework\DevExpress.Data.v21.2.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="DigitalData.Modules.Base">
|
|
||||||
<HintPath>..\..\2_DLL Projekte\DDModules\Base\bin\Debug\DigitalData.Modules.Base.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="DigitalData.Modules.Config">
|
|
||||||
<HintPath>..\..\2_DLL Projekte\DDModules\Config\bin\Debug\DigitalData.Modules.Config.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="DigitalData.Modules.Database">
|
|
||||||
<HintPath>..\..\2_DLL Projekte\DDModules\Database\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="DigitalData.Modules.Logging">
|
|
||||||
<HintPath>..\..\2_DLL Projekte\DDModules\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="GdPicture.NET.14">
|
<Reference Include="GdPicture.NET.14">
|
||||||
<HintPath>D:\ProgramFiles\GdPicture.NET 14\Redist\GdPicture.NET (.NET Framework 4.5)\GdPicture.NET.14.dll</HintPath>
|
<HintPath>D:\ProgramFiles\GdPicture.NET 14\Redist\GdPicture.NET (.NET Framework 4.5)\GdPicture.NET.14.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
|||||||
@@ -1,58 +1,82 @@
|
|||||||
namespace EnvelopeGenerator.Web.Models;
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
public record Annotation(
|
namespace EnvelopeGenerator.Web.Models;
|
||||||
string Id,
|
|
||||||
string? HorBoundAnnotId = null, string? VerBoundAnnotId = null)
|
public record Annotation
|
||||||
{
|
{
|
||||||
#region Layout
|
public required string Name { get; init; }
|
||||||
internal double _marginX = default;
|
|
||||||
|
|
||||||
internal double _marginY = default;
|
#region Bound Annotation
|
||||||
|
[JsonIgnore]
|
||||||
|
public string? HorBoundAnnotName { get; init; }
|
||||||
|
|
||||||
internal double _width = default;
|
[JsonIgnore]
|
||||||
|
public string? VerBoundAnnotName { get; init; }
|
||||||
internal double _height = default;
|
|
||||||
|
|
||||||
public double MarginX
|
|
||||||
{
|
|
||||||
get => _marginX;
|
|
||||||
init => _marginX = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public double MarginY
|
|
||||||
{
|
|
||||||
get => _marginY;
|
|
||||||
init => _marginY = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public double Width
|
|
||||||
{
|
|
||||||
get => _width;
|
|
||||||
init => _width = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public double Height
|
|
||||||
{
|
|
||||||
get => _height;
|
|
||||||
init => _height = value;
|
|
||||||
}
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Pos
|
#region Layout
|
||||||
public double PosX => MarginX + (HorBoundAnnot?.HorBoundary ?? 0);
|
[JsonIgnore]
|
||||||
|
public double? MarginLeft { get; set; }
|
||||||
|
|
||||||
public double PosY => MarginY + (VerBoundAnnot?.VerBoundary ?? 0);
|
[JsonIgnore]
|
||||||
|
public double MarginLeftRatio { get; init; } = 1;
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
public double? MarginTop { get; set; }
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
public double MarginTopRatio { get; init; } = 1;
|
||||||
|
|
||||||
|
public double? Width { get; set; }
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
public double WidthRatio { get; init; } = 1;
|
||||||
|
|
||||||
|
public double? Height { get; set; }
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
public double HeightRatio { get; init; } = 1;
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Position
|
||||||
|
public double Left => (MarginLeft ?? 0) + (HorBoundAnnot?.HorBoundary ?? 0);
|
||||||
|
|
||||||
|
public double Top => (MarginTop ?? 0) + (VerBoundAnnot?.VerBoundary ?? 0);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Boundary
|
#region Boundary
|
||||||
public double HorBoundary => MarginX + Width;
|
[JsonIgnore]
|
||||||
|
public double HorBoundary => Left + (Width ?? 0);
|
||||||
|
|
||||||
public double VerBoundary => MarginY + Height;
|
[JsonIgnore]
|
||||||
|
public double VerBoundary => Top + (Height ?? 0);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region BoundAnnot
|
#region BoundAnnot
|
||||||
public Annot? HorBoundAnnot { get; set; }
|
[JsonIgnore]
|
||||||
|
public Annotation? HorBoundAnnot { get; set; }
|
||||||
|
|
||||||
public Annot? VerBoundAnnot { get; set; }
|
[JsonIgnore]
|
||||||
|
public Annotation? VerBoundAnnot { get; set; }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
internal Annotation Default
|
||||||
|
{
|
||||||
|
set
|
||||||
|
{
|
||||||
|
// To set null value, annotation must have null (0) value but null must has non-null value
|
||||||
|
if (MarginLeft == null && value.MarginLeft != null)
|
||||||
|
MarginLeft = value.MarginLeft * MarginLeftRatio;
|
||||||
|
|
||||||
|
if (MarginTop == null && value.MarginTop != null)
|
||||||
|
MarginTop = value.MarginTop * MarginTopRatio;
|
||||||
|
|
||||||
|
if (Width == null && value.Width != null)
|
||||||
|
Width = value.Width * WidthRatio;
|
||||||
|
|
||||||
|
if (Height == null && value.Height != null)
|
||||||
|
Height = value.Height * HeightRatio;
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
57
EnvelopeGenerator.Web/Models/AnnotationParams.cs
Normal file
57
EnvelopeGenerator.Web/Models/AnnotationParams.cs
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Web.Models;
|
||||||
|
|
||||||
|
public class AnnotationParams
|
||||||
|
{
|
||||||
|
[JsonIgnore]
|
||||||
|
public Annotation? DefaultAnnotation { get; init; }
|
||||||
|
|
||||||
|
private readonly IEnumerable<Annotation> _annots = new List<Annotation>();
|
||||||
|
|
||||||
|
public Annotation this[string name] => _annots.First(a => a.Name == name);
|
||||||
|
|
||||||
|
public bool TryGet(string name, out Annotation annotation)
|
||||||
|
{
|
||||||
|
#pragma warning disable CS8601 // Possible null reference assignment.
|
||||||
|
annotation = _annots.FirstOrDefault(a => a.Name == name);
|
||||||
|
#pragma warning restore CS8601 // Possible null reference assignment.
|
||||||
|
return annotation is not null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public required IEnumerable<Annotation> Annotations
|
||||||
|
{
|
||||||
|
get => _annots;
|
||||||
|
init
|
||||||
|
{
|
||||||
|
_annots = value;
|
||||||
|
|
||||||
|
if (DefaultAnnotation is not null)
|
||||||
|
foreach (var annot in _annots)
|
||||||
|
annot.Default = DefaultAnnotation;
|
||||||
|
|
||||||
|
foreach (var annot in _annots)
|
||||||
|
{
|
||||||
|
#region set bound annotations
|
||||||
|
// horizontal
|
||||||
|
if (annot.HorBoundAnnotName is string horBoundAnnotName)
|
||||||
|
if (TryGet(horBoundAnnotName, out var horBoundAnnot))
|
||||||
|
annot.HorBoundAnnot = horBoundAnnot;
|
||||||
|
else
|
||||||
|
throw new InvalidOperationException($"{horBoundAnnotName} added as bound anotation. However, it is not defined.");
|
||||||
|
|
||||||
|
// vertical
|
||||||
|
if (annot.VerBoundAnnotName is string verBoundAnnotName)
|
||||||
|
if (TryGet(verBoundAnnotName, out var verBoundAnnot))
|
||||||
|
annot.VerBoundAnnot = verBoundAnnot;
|
||||||
|
else
|
||||||
|
throw new InvalidOperationException($"{verBoundAnnotName} added as bound anotation. However, it is not defined.");
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
|
||||||
|
AnnotationDictionary = _annots.ToDictionary(a => a.Name.ToLower(), a => a);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Dictionary<string, Annotation> AnnotationDictionary { get; private init; } = new();
|
||||||
|
}
|
||||||
@@ -15,6 +15,7 @@ using DigitalData.EmailProfilerDispatcher;
|
|||||||
using EnvelopeGenerator.Infrastructure;
|
using EnvelopeGenerator.Infrastructure;
|
||||||
using EnvelopeGenerator.Web.Sanitizers;
|
using EnvelopeGenerator.Web.Sanitizers;
|
||||||
using EnvelopeGenerator.Application.Contracts.Services;
|
using EnvelopeGenerator.Application.Contracts.Services;
|
||||||
|
using EnvelopeGenerator.Application.Extensions;
|
||||||
|
|
||||||
var logger = LogManager.Setup().LoadConfigurationFromAppSettings().GetCurrentClassLogger();
|
var logger = LogManager.Setup().LoadConfigurationFromAppSettings().GetCurrentClassLogger();
|
||||||
logger.Info("Logging initialized!");
|
logger.Info("Logging initialized!");
|
||||||
@@ -80,7 +81,7 @@ try
|
|||||||
|
|
||||||
//AddEF Core dbcontext
|
//AddEF Core dbcontext
|
||||||
var connStr = config.GetConnectionString(Key.Default) ?? throw new InvalidOperationException("There is no default connection string in appsettings.json.");
|
var connStr = config.GetConnectionString(Key.Default) ?? throw new InvalidOperationException("There is no default connection string in appsettings.json.");
|
||||||
builder.Services.AddDbContext<EGDbContext>(options => options.UseSqlServer(connStr));
|
|
||||||
builder.Services.AddDistributedSqlServerCache(options =>
|
builder.Services.AddDistributedSqlServerCache(options =>
|
||||||
{
|
{
|
||||||
options.ConnectionString = connStr;
|
options.ConnectionString = connStr;
|
||||||
@@ -89,7 +90,9 @@ try
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Add envelope generator services
|
// Add envelope generator services
|
||||||
builder.Services.AddEnvelopeGenerator(config);
|
builder.Services.AddEnvelopeGeneratorRepositories(options => options.UseSqlServer(connStr));
|
||||||
|
|
||||||
|
builder.Services.AddEnvelopeGeneratorServices(config);
|
||||||
|
|
||||||
builder.Services.Configure<CookiePolicyOptions>(options =>
|
builder.Services.Configure<CookiePolicyOptions>(options =>
|
||||||
{
|
{
|
||||||
@@ -163,6 +166,8 @@ try
|
|||||||
|
|
||||||
builder.ConfigureBySection<CustomImages>();
|
builder.ConfigureBySection<CustomImages>();
|
||||||
|
|
||||||
|
builder.ConfigureBySection<AnnotationParams>();
|
||||||
|
|
||||||
var app = builder.Build();
|
var app = builder.Build();
|
||||||
|
|
||||||
// Configure the HTTP request pipeline.
|
// Configure the HTTP request pipeline.
|
||||||
|
|||||||
@@ -149,5 +149,60 @@
|
|||||||
"EnvelopeReceiverReadOnly": [ "TBSIG_ENVELOPE_RECEIVER_READ_ONLY_UPD" ],
|
"EnvelopeReceiverReadOnly": [ "TBSIG_ENVELOPE_RECEIVER_READ_ONLY_UPD" ],
|
||||||
"Receiver": []
|
"Receiver": []
|
||||||
},
|
},
|
||||||
"MainPageTitle": null
|
"MainPageTitle": null,
|
||||||
|
"AnnotationParams": {
|
||||||
|
"DefaultAnnotation": {
|
||||||
|
"Width": 1,
|
||||||
|
"Height": 0.5,
|
||||||
|
"MarginTop": 1
|
||||||
|
},
|
||||||
|
"Annotations": [
|
||||||
|
{
|
||||||
|
"Name": "Signature",
|
||||||
|
"MarginTop": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "PositionLabel",
|
||||||
|
"VerBoundAnnotName": "Signature",
|
||||||
|
"WidthRatio": 1.2,
|
||||||
|
"HeightRatio": 0.5,
|
||||||
|
"MarginTopRatio": 0.22
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "Position",
|
||||||
|
"VerBoundAnnotName": "PositionLabel",
|
||||||
|
"WidthRatio": 1.2,
|
||||||
|
"HeightRatio": 0.5,
|
||||||
|
"MarginTopRatio": -0.05
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "CityLabel",
|
||||||
|
"VerBoundAnnotName": "Position",
|
||||||
|
"WidthRatio": 1.2,
|
||||||
|
"HeightRatio": 0.5,
|
||||||
|
"MarginTopRatio": 0.05
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "City",
|
||||||
|
"VerBoundAnnotName": "CityLabel",
|
||||||
|
"WidthRatio": 1.2,
|
||||||
|
"HeightRatio": 0.5,
|
||||||
|
"MarginTopRatio": -0.05
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "DateLabel",
|
||||||
|
"VerBoundAnnotName": "City",
|
||||||
|
"WidthRatio": 1.55,
|
||||||
|
"HeightRatio": 0.5,
|
||||||
|
"MarginTopRatio": 0.05
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "Date",
|
||||||
|
"VerBoundAnnotName": "DateLabel",
|
||||||
|
"WidthRatio": 1.55,
|
||||||
|
"HeightRatio": 0.5,
|
||||||
|
"MarginTopRatio": -0.1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,47 +1,20 @@
|
|||||||
class Annotation {
|
|
||||||
static async createAnnotations(document, instance) {
|
async function createAnnotations(document, instance) {
|
||||||
const signatures = []
|
const signatures = [];
|
||||||
|
|
||||||
for (var element of document.elements) {
|
for(var element of document.elements) {
|
||||||
const [annotation, formField, annotation_date, formFieldDate, annotation_city, formFieldCity, annotation_date_label, formFieldDateLabel, annotation_city_label, formFieldCityLabel] = await Annotation.createSignature(element)
|
const annotParams = await getAnnotationParams(element.left, element.top);
|
||||||
signatures.push(annotation)
|
|
||||||
signatures.push(formField)
|
|
||||||
signatures.push(annotation_date)
|
|
||||||
signatures.push(formFieldDate)
|
|
||||||
signatures.push(annotation_city)
|
|
||||||
signatures.push(formFieldCity)
|
|
||||||
|
|
||||||
signatures.push(annotation_date_label)
|
|
||||||
signatures.push(formFieldDateLabel)
|
|
||||||
|
|
||||||
signatures.push(annotation_city_label)
|
|
||||||
signatures.push(formFieldCityLabel)
|
|
||||||
}
|
|
||||||
|
|
||||||
await instance.create(signatures)
|
|
||||||
}
|
|
||||||
|
|
||||||
static async createSignature(element) {
|
|
||||||
const id = PSPDFKit.generateInstantId()
|
|
||||||
const width = Annotation.inchToPoint(element.width)
|
|
||||||
const height = Annotation.inchToPoint(element.height)
|
|
||||||
const top = Annotation.inchToPoint(element.top) - height / 2
|
|
||||||
const left = Annotation.inchToPoint(element.left) - width / 2
|
|
||||||
const page = element.page - 1
|
const page = element.page - 1
|
||||||
|
|
||||||
//signatures
|
//signatures
|
||||||
|
const id = PSPDFKit.generateInstantId()
|
||||||
const annotation = new PSPDFKit.Annotations.WidgetAnnotation({
|
const annotation = new PSPDFKit.Annotations.WidgetAnnotation({
|
||||||
id: id,
|
id: id,
|
||||||
pageIndex: page,
|
pageIndex: page,
|
||||||
formFieldName: id,
|
formFieldName: id,
|
||||||
backgroundColor: PSPDFKit.Color.YELLOW,
|
backgroundColor: PSPDFKit.Color.YELLOW,
|
||||||
blendMode: 'multiply',
|
blendMode: 'multiply',
|
||||||
boundingBox: new PSPDFKit.Geometry.Rect({
|
boundingBox: new PSPDFKit.Geometry.Rect(annotParams.signature),
|
||||||
width,
|
|
||||||
height,
|
|
||||||
top,
|
|
||||||
left,
|
|
||||||
}),
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const formField = new PSPDFKit.FormFields.SignatureFormField({
|
const formField = new PSPDFKit.FormFields.SignatureFormField({
|
||||||
@@ -49,10 +22,44 @@
|
|||||||
annotationIds: PSPDFKit.Immutable.List([annotation.id]),
|
annotationIds: PSPDFKit.Immutable.List([annotation.id]),
|
||||||
})
|
})
|
||||||
|
|
||||||
/**
|
//position
|
||||||
* Date, post code and place text form part
|
const id_position = PSPDFKit.generateInstantId()
|
||||||
*/
|
const annotation_position = new PSPDFKit.Annotations.WidgetAnnotation({
|
||||||
const date_place_top_shift = 9.5;
|
id: id_position,
|
||||||
|
pageIndex: page,
|
||||||
|
formFieldName: id_position,
|
||||||
|
backgroundColor: PSPDFKit.Color.DarkBlue,
|
||||||
|
blendMode: 'multiply',
|
||||||
|
boundingBox: new PSPDFKit.Geometry.Rect(annotParams.position),
|
||||||
|
fontSize: 8
|
||||||
|
})
|
||||||
|
|
||||||
|
const formFieldPosition = new PSPDFKit.FormFields.TextFormField({
|
||||||
|
name: id_position,
|
||||||
|
annotationIds: PSPDFKit.Immutable.List([annotation_position.id]),
|
||||||
|
value: "",
|
||||||
|
readOnly: false
|
||||||
|
})
|
||||||
|
|
||||||
|
//city
|
||||||
|
const id_city = PSPDFKit.generateInstantId()
|
||||||
|
const annotation_city = new PSPDFKit.Annotations.WidgetAnnotation({
|
||||||
|
id: id_city,
|
||||||
|
pageIndex: page,
|
||||||
|
formFieldName: id_city,
|
||||||
|
backgroundColor: PSPDFKit.Color.DarkBlue,
|
||||||
|
blendMode: 'multiply',
|
||||||
|
boundingBox: new PSPDFKit.Geometry.Rect(annotParams.city),
|
||||||
|
fontSize: 8
|
||||||
|
})
|
||||||
|
|
||||||
|
const formFieldCity = new PSPDFKit.FormFields.TextFormField({
|
||||||
|
name: id_city,
|
||||||
|
annotationIds: PSPDFKit.Immutable.List([annotation_city.id]),
|
||||||
|
value: "",
|
||||||
|
readOnly: false
|
||||||
|
})
|
||||||
|
|
||||||
//date
|
//date
|
||||||
const id_date = PSPDFKit.generateInstantId()
|
const id_date = PSPDFKit.generateInstantId()
|
||||||
const annotation_date = new PSPDFKit.Annotations.WidgetAnnotation({
|
const annotation_date = new PSPDFKit.Annotations.WidgetAnnotation({
|
||||||
@@ -61,12 +68,7 @@
|
|||||||
formFieldName: id_date,
|
formFieldName: id_date,
|
||||||
backgroundColor: PSPDFKit.Color.DarkBlue,
|
backgroundColor: PSPDFKit.Color.DarkBlue,
|
||||||
blendMode: 'multiply',
|
blendMode: 'multiply',
|
||||||
boundingBox: new PSPDFKit.Geometry.Rect({
|
boundingBox: new PSPDFKit.Geometry.Rect(annotParams.date),
|
||||||
width: width * 1.55,
|
|
||||||
height: height / 2,
|
|
||||||
top: top + height + 25 + date_place_top_shift + (height),
|
|
||||||
left: left
|
|
||||||
}),
|
|
||||||
fontSize: 8,
|
fontSize: 8,
|
||||||
backgroundColor: PSPDFKit.Color.TRANSPARENT,
|
backgroundColor: PSPDFKit.Color.TRANSPARENT,
|
||||||
fontColor: PSPDFKit.Color.Black,
|
fontColor: PSPDFKit.Color.Black,
|
||||||
@@ -81,30 +83,6 @@
|
|||||||
readOnly: true
|
readOnly: true
|
||||||
})
|
})
|
||||||
|
|
||||||
//city
|
|
||||||
const id_city = PSPDFKit.generateInstantId()
|
|
||||||
const annotation_city = new PSPDFKit.Annotations.WidgetAnnotation({
|
|
||||||
id: id_city,
|
|
||||||
pageIndex: page,
|
|
||||||
formFieldName: id_city,
|
|
||||||
backgroundColor: PSPDFKit.Color.DarkBlue,
|
|
||||||
blendMode: 'multiply',
|
|
||||||
boundingBox: new PSPDFKit.Geometry.Rect({
|
|
||||||
width: width * 1.2,
|
|
||||||
height: height / 2,
|
|
||||||
top: top + height + 23 + date_place_top_shift + 2,
|
|
||||||
left: left,
|
|
||||||
}),
|
|
||||||
fontSize: 8
|
|
||||||
})
|
|
||||||
|
|
||||||
const formFieldCity = new PSPDFKit.FormFields.TextFormField({
|
|
||||||
name: id_city,
|
|
||||||
annotationIds: PSPDFKit.Immutable.List([annotation_city.id]),
|
|
||||||
value: "",
|
|
||||||
readOnly: false
|
|
||||||
})
|
|
||||||
|
|
||||||
this.markFieldAsRequired(formFieldCity);
|
this.markFieldAsRequired(formFieldCity);
|
||||||
|
|
||||||
this.markFieldAsCity(formFieldCity);
|
this.markFieldAsCity(formFieldCity);
|
||||||
@@ -112,7 +90,6 @@
|
|||||||
/**
|
/**
|
||||||
* Date, post code and place label part
|
* Date, post code and place label part
|
||||||
*/
|
*/
|
||||||
const label_top_shift = -15
|
|
||||||
|
|
||||||
//date label
|
//date label
|
||||||
const id_date_label = PSPDFKit.generateInstantId()
|
const id_date_label = PSPDFKit.generateInstantId()
|
||||||
@@ -121,12 +98,7 @@
|
|||||||
pageIndex: page,
|
pageIndex: page,
|
||||||
formFieldName: id_date_label,
|
formFieldName: id_date_label,
|
||||||
blendMode: 'multiply',
|
blendMode: 'multiply',
|
||||||
boundingBox: new PSPDFKit.Geometry.Rect({
|
boundingBox: new PSPDFKit.Geometry.Rect(annotParams.datelabel),
|
||||||
width: width * 0.75,
|
|
||||||
height: height / 2,
|
|
||||||
top: top + height + 23 + label_top_shift + date_place_top_shift + (height) + 4,
|
|
||||||
left: left
|
|
||||||
}),
|
|
||||||
fontSize: 8,
|
fontSize: 8,
|
||||||
backgroundColor: PSPDFKit.Color.TRANSPARENT,
|
backgroundColor: PSPDFKit.Color.TRANSPARENT,
|
||||||
fontColor: PSPDFKit.Color.Black,
|
fontColor: PSPDFKit.Color.Black,
|
||||||
@@ -148,12 +120,7 @@
|
|||||||
pageIndex: page,
|
pageIndex: page,
|
||||||
formFieldName: id_city_label,
|
formFieldName: id_city_label,
|
||||||
blendMode: 'multiply',
|
blendMode: 'multiply',
|
||||||
boundingBox: new PSPDFKit.Geometry.Rect({
|
boundingBox: new PSPDFKit.Geometry.Rect(annotParams.citylabel),
|
||||||
width: width * 1.2,
|
|
||||||
height: height / 2,
|
|
||||||
top: top + height + 25 + label_top_shift + date_place_top_shift,
|
|
||||||
left: left
|
|
||||||
}),
|
|
||||||
fontSize: 8,
|
fontSize: 8,
|
||||||
backgroundColor: PSPDFKit.Color.TRANSPARENT,
|
backgroundColor: PSPDFKit.Color.TRANSPARENT,
|
||||||
fontColor: PSPDFKit.Color.Black,
|
fontColor: PSPDFKit.Color.Black,
|
||||||
@@ -167,167 +134,169 @@
|
|||||||
readOnly: true
|
readOnly: true
|
||||||
})
|
})
|
||||||
|
|
||||||
return [annotation, formField, annotation_date, formFieldDate, annotation_city, formFieldCity, annotation_date_label, formFieldDateLabel, annotation_city_label, formFieldCityLabel]
|
//position label
|
||||||
}
|
const id_position_label = PSPDFKit.generateInstantId()
|
||||||
|
const annotation_position_label = new PSPDFKit.Annotations.WidgetAnnotation({
|
||||||
static createTextBox(element) {
|
id: id_position_label,
|
||||||
const id = PSPDFKit.generateInstantId()
|
|
||||||
const width = Annotation.inchToPoint(element.width)
|
|
||||||
const height = Annotation.inchToPoint(element.height)
|
|
||||||
const top = Annotation.inchToPoint(element.top) - height / 2
|
|
||||||
const left = Annotation.inchToPoint(element.left) - width / 2
|
|
||||||
const page = element.page - 1
|
|
||||||
|
|
||||||
//shift
|
|
||||||
top += height + 10
|
|
||||||
|
|
||||||
const annotation = new PSPDFKit.Annotations.WidgetAnnotation({
|
|
||||||
id: id,
|
|
||||||
pageIndex: page,
|
pageIndex: page,
|
||||||
formFieldName: id,
|
formFieldName: id_position_label,
|
||||||
backgroundColor: PSPDFKit.Color.YELLOW,
|
|
||||||
blendMode: 'multiply',
|
blendMode: 'multiply',
|
||||||
boundingBox: new PSPDFKit.Geometry.Rect({
|
boundingBox: new PSPDFKit.Geometry.Rect(annotParams.positionlabel),
|
||||||
width,
|
fontSize: 8,
|
||||||
height,
|
backgroundColor: PSPDFKit.Color.TRANSPARENT,
|
||||||
top,
|
fontColor: PSPDFKit.Color.Black,
|
||||||
left,
|
isBold: true,
|
||||||
}),
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const formField = new PSPDFKit.FormFields.SignatureFormField({
|
const formFieldPositionLabel = new PSPDFKit.FormFields.TextFormField({
|
||||||
name: id,
|
name: id_position_label,
|
||||||
annotationIds: PSPDFKit.Immutable.List([annotation.id]),
|
annotationIds: PSPDFKit.Immutable.List([annotation_position_label.id]),
|
||||||
|
value: "Position",
|
||||||
|
readOnly: true
|
||||||
})
|
})
|
||||||
|
|
||||||
return [annotation, formField]
|
signatures.push(annotation)
|
||||||
|
signatures.push(formField)
|
||||||
|
signatures.push(annotation_date)
|
||||||
|
signatures.push(formFieldDate)
|
||||||
|
signatures.push(annotation_city)
|
||||||
|
signatures.push(formFieldCity)
|
||||||
|
signatures.push(annotation_position)
|
||||||
|
signatures.push(formFieldPosition)
|
||||||
|
|
||||||
|
signatures.push(annotation_date_label)
|
||||||
|
signatures.push(formFieldDateLabel)
|
||||||
|
|
||||||
|
signatures.push(annotation_city_label)
|
||||||
|
signatures.push(formFieldCityLabel)
|
||||||
|
|
||||||
|
signatures.push(annotation_position_label)
|
||||||
|
signatures.push(formFieldPositionLabel)
|
||||||
}
|
}
|
||||||
|
|
||||||
static async getAnnotations(instance) {
|
await instance.create(signatures);
|
||||||
const array = await Promise.all(
|
}
|
||||||
Array.from({ length: instance.totalPageCount }).map((_, pageIndex) =>
|
|
||||||
instance.getAnnotations(pageIndex)
|
async function getAnnotations(instance) {
|
||||||
)
|
const array = await Promise.all(
|
||||||
|
Array.from({ length: instance.totalPageCount }).map((_, pageIndex) =>
|
||||||
|
instance.getAnnotations(pageIndex)
|
||||||
)
|
)
|
||||||
|
)
|
||||||
|
|
||||||
return array.flatMap((annotations) =>
|
return array.flatMap((annotations) =>
|
||||||
annotations.reduce((acc, annotation) => acc.concat(annotation), [])
|
annotations.reduce((acc, annotation) => acc.concat(annotation), [])
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
static async deleteAnnotations(instance) {
|
async function deleteAnnotations(instance) {
|
||||||
const allAnnotations = await Annotation.getAnnotations(instance)
|
const allAnnotations = await getAnnotations(instance)
|
||||||
const pageAnnotations = allAnnotations.filter(Annotation.isSignature)
|
const pageAnnotations = allAnnotations.filter(isSignature)
|
||||||
//deleting all Annotations
|
//deleting all Annotations
|
||||||
return await instance.delete(pageAnnotations)
|
return await instance.delete(pageAnnotations)
|
||||||
}
|
}
|
||||||
|
|
||||||
static async validateAnnotations(instance) {
|
async function validateAnnotations(instance) {
|
||||||
const allAnnotations = await Annotation.getAnnotations(instance)
|
const allAnnotations = await getAnnotations(instance)
|
||||||
const pageAnnotations = allAnnotations
|
const pageAnnotations = allAnnotations
|
||||||
.map((annotation) => {
|
.map((annotation) => {
|
||||||
return annotation
|
return annotation
|
||||||
})
|
|
||||||
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
static isSignature(annotation) {
|
|
||||||
return !!annotation.isSignature || annotation.description == 'FRAME'
|
|
||||||
}
|
|
||||||
|
|
||||||
static createImageAnnotation(boundingBox, pageIndex, imageAttachmentId) {
|
|
||||||
const frameAnnotation = new PSPDFKit.Annotations.ImageAnnotation({
|
|
||||||
pageIndex: pageIndex,
|
|
||||||
isSignature: false,
|
|
||||||
readOnly: true,
|
|
||||||
locked: true,
|
|
||||||
lockedContents: true,
|
|
||||||
contentType: 'image/png',
|
|
||||||
imageAttachmentId,
|
|
||||||
description: 'FRAME',
|
|
||||||
boundingBox: boundingBox,
|
|
||||||
})
|
})
|
||||||
return frameAnnotation
|
|
||||||
}
|
|
||||||
|
|
||||||
static async createAnnotationFrameBlob(receiverName, receiverSignature, timestamp, width, height) {
|
return true
|
||||||
Comp.SignatureProgress.SignedCount += 1;
|
}
|
||||||
const canvas = document.createElement('canvas')
|
|
||||||
const scale = 4
|
|
||||||
const fontSize = 10
|
|
||||||
|
|
||||||
canvas.width = width * scale
|
function isSignature(annotation) {
|
||||||
canvas.height = height * scale
|
return !!annotation.isSignature || annotation.description == 'FRAME'
|
||||||
|
}
|
||||||
|
|
||||||
const ctx = canvas.getContext('2d')
|
function createImageAnnotation(boundingBox, pageIndex, imageAttachmentId) {
|
||||||
// This supposedly makes the lines and text less blurry
|
const frameAnnotation = new PSPDFKit.Annotations.ImageAnnotation({
|
||||||
// See: https://stackoverflow.com/questions/8696631/canvas-drawings-like-lines-are-blurry
|
pageIndex: pageIndex,
|
||||||
ctx.translate(0.5, 0.5)
|
isSignature: false,
|
||||||
|
readOnly: true,
|
||||||
|
locked: true,
|
||||||
|
lockedContents: true,
|
||||||
|
contentType: 'image/png',
|
||||||
|
imageAttachmentId,
|
||||||
|
description: 'FRAME',
|
||||||
|
boundingBox: boundingBox,
|
||||||
|
})
|
||||||
|
return frameAnnotation
|
||||||
|
}
|
||||||
|
|
||||||
// This also should make the lines and text less blurry
|
async function createAnnotationFrameBlob(receiverName, receiverSignature, timestamp, width, height) {
|
||||||
ctx.textRendering = "geometricPrecision"
|
Comp.SignatureProgress.SignedCount += 1;
|
||||||
|
const canvas = document.createElement('canvas')
|
||||||
|
const scale = 4
|
||||||
|
const fontSize = 10
|
||||||
|
|
||||||
const date = timestamp
|
canvas.width = width * scale
|
||||||
const dateString = date.toLocaleString('de-DE')
|
canvas.height = height * scale
|
||||||
|
|
||||||
const signatureLength = 100 * scale
|
const ctx = canvas.getContext('2d')
|
||||||
const signatureString = receiverSignature.substring(0, 15) + "…"
|
// This supposedly makes the lines and text less blurry
|
||||||
|
// See: https://stackoverflow.com/questions/8696631/canvas-drawings-like-lines-are-blurry
|
||||||
|
ctx.translate(0.5, 0.5)
|
||||||
|
|
||||||
ctx.beginPath()
|
// This also should make the lines and text less blurry
|
||||||
|
ctx.textRendering = "geometricPrecision"
|
||||||
|
|
||||||
ctx.moveTo(30 * scale, 10 * scale)
|
const date = timestamp
|
||||||
ctx.lineTo(signatureLength, 10 * scale)
|
const dateString = date.toLocaleString('de-DE')
|
||||||
|
|
||||||
ctx.moveTo(30 * scale, 10 * scale)
|
const signatureLength = 100 * scale
|
||||||
ctx.arcTo(10 * scale, 10 * scale, 10 * scale, 30 * scale, 20 * scale)
|
const signatureString = receiverSignature.substring(0, 15) + "…"
|
||||||
|
|
||||||
ctx.moveTo(10 * scale, 30 * scale)
|
ctx.beginPath()
|
||||||
ctx.arcTo(10 * scale, 50 * scale, 30 * scale, 50 * scale, 20 * scale)
|
|
||||||
|
|
||||||
ctx.moveTo(30 * scale, 50 * scale)
|
ctx.moveTo(30 * scale, 10 * scale)
|
||||||
ctx.lineTo(signatureLength, 50 * scale)
|
ctx.lineTo(signatureLength, 10 * scale)
|
||||||
|
|
||||||
ctx.strokeStyle = 'darkblue'
|
ctx.moveTo(30 * scale, 10 * scale)
|
||||||
ctx.stroke()
|
ctx.arcTo(10 * scale, 10 * scale, 10 * scale, 30 * scale, 20 * scale)
|
||||||
|
|
||||||
ctx.fillStyle = 'black'
|
ctx.moveTo(10 * scale, 30 * scale)
|
||||||
ctx.font = `${fontSize * scale}px sans-serif`
|
ctx.arcTo(10 * scale, 50 * scale, 30 * scale, 50 * scale, 20 * scale)
|
||||||
ctx.fillText('Signed by', 15 * scale, 10 * scale)
|
|
||||||
ctx.fillText(receiverName, 15 * scale, 60 * scale)
|
|
||||||
ctx.fillText(signatureString, 15 * scale, 70 * scale)
|
|
||||||
|
|
||||||
return new Promise((resolve) => {
|
ctx.moveTo(30 * scale, 50 * scale)
|
||||||
canvas.toBlob((blob) => {
|
ctx.lineTo(signatureLength, 50 * scale)
|
||||||
const url = URL.createObjectURL(blob)
|
|
||||||
resolve(url)
|
ctx.strokeStyle = 'darkblue'
|
||||||
})
|
ctx.stroke()
|
||||||
|
|
||||||
|
ctx.fillStyle = 'black'
|
||||||
|
ctx.font = `${fontSize * scale}px sans-serif`
|
||||||
|
ctx.fillText('Signed by', 15 * scale, 10 * scale)
|
||||||
|
ctx.fillText(receiverName, 15 * scale, 60 * scale)
|
||||||
|
ctx.fillText(signatureString, 15 * scale, 70 * scale)
|
||||||
|
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
canvas.toBlob((blob) => {
|
||||||
|
const url = URL.createObjectURL(blob)
|
||||||
|
resolve(url)
|
||||||
})
|
})
|
||||||
}
|
})
|
||||||
|
}
|
||||||
|
|
||||||
static inchToPoint(inch) {
|
//required
|
||||||
return inch * 72
|
requiredFieldNames = new Array()
|
||||||
}
|
|
||||||
|
|
||||||
//required
|
function markFieldAsRequired(formField) {
|
||||||
static #requiredFieldNames = new Array()
|
requiredFieldNames.push(formField.name)
|
||||||
|
}
|
||||||
|
|
||||||
static markFieldAsRequired(formField) {
|
function isFieldRequired(formField) {
|
||||||
this.#requiredFieldNames.push(formField.name)
|
return requiredFieldNames.includes(formField.name)
|
||||||
}
|
}
|
||||||
|
|
||||||
static isFieldRequired(formField) {
|
//city
|
||||||
return this.#requiredFieldNames.includes(formField.name)
|
cityFieldNames = new Array()
|
||||||
}
|
|
||||||
|
|
||||||
//city
|
function markFieldAsCity(formField) {
|
||||||
static #cityFieldNames = new Array()
|
cityFieldNames.push(formField.name)
|
||||||
|
}
|
||||||
|
|
||||||
static markFieldAsCity(formField) {
|
function isCityField(formField) {
|
||||||
this.#cityFieldNames.push(formField.name)
|
return cityFieldNames.includes(formField.name)
|
||||||
}
|
|
||||||
|
|
||||||
static isCityField(formField) {
|
|
||||||
return this.#cityFieldNames.includes(formField.name)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -70,7 +70,7 @@ class App {
|
|||||||
// Load annotations into PSPDFKit
|
// Load annotations into PSPDFKit
|
||||||
try {
|
try {
|
||||||
this.signatureCount = this.currentDocument.elements.length
|
this.signatureCount = this.currentDocument.elements.length
|
||||||
await Annotation.createAnnotations(this.currentDocument, this.Instance)
|
await createAnnotations(this.currentDocument, this.Instance)
|
||||||
|
|
||||||
const openResponse = await this.Network.openDocument(this.envelopeKey)
|
const openResponse = await this.Network.openDocument(this.envelopeKey)
|
||||||
|
|
||||||
@@ -109,7 +109,7 @@ class App {
|
|||||||
const height = 75
|
const height = 75
|
||||||
const timestamp = new Date()
|
const timestamp = new Date()
|
||||||
|
|
||||||
const imageUrl = await Annotation.createAnnotationFrameBlob(
|
const imageUrl = await createAnnotationFrameBlob(
|
||||||
this.envelopeReceiver.name,
|
this.envelopeReceiver.name,
|
||||||
this.currentReceiver.signature,
|
this.currentReceiver.signature,
|
||||||
timestamp,
|
timestamp,
|
||||||
@@ -121,7 +121,7 @@ class App {
|
|||||||
const blob = await request.blob()
|
const blob = await request.blob()
|
||||||
const imageAttachmentId = await this.Instance.createAttachment(blob)
|
const imageAttachmentId = await this.Instance.createAttachment(blob)
|
||||||
|
|
||||||
const frameAnnotation = Annotation.createImageAnnotation(
|
const frameAnnotation = createImageAnnotation(
|
||||||
new PSPDFKit.Geometry.Rect({
|
new PSPDFKit.Geometry.Rect({
|
||||||
left: left,
|
left: left,
|
||||||
top: top,
|
top: top,
|
||||||
@@ -222,7 +222,7 @@ class App {
|
|||||||
const iFormFieldValues = await iJSON.formFieldValues;
|
const iFormFieldValues = await iJSON.formFieldValues;
|
||||||
|
|
||||||
//check required
|
//check required
|
||||||
const iReqFields = iFormFieldValues.filter(f => Annotation.isFieldRequired(f))
|
const iReqFields = iFormFieldValues.filter(f => isFieldRequired(f))
|
||||||
const hasEmptyReq = iReqFields.some(f => (f.value === undefined || f.value === null || f.value === ""))
|
const hasEmptyReq = iReqFields.some(f => (f.value === undefined || f.value === null || f.value === ""))
|
||||||
|
|
||||||
if (hasEmptyReq) {
|
if (hasEmptyReq) {
|
||||||
@@ -236,7 +236,7 @@ class App {
|
|||||||
|
|
||||||
//check city
|
//check city
|
||||||
const city_regex = new RegExp("^[a-zA-Z\\u0080-\\u024F]+(?:([\\ \\-\\']|(\\.\\ ))[a-zA-Z\\u0080-\\u024F]+)*$")
|
const city_regex = new RegExp("^[a-zA-Z\\u0080-\\u024F]+(?:([\\ \\-\\']|(\\.\\ ))[a-zA-Z\\u0080-\\u024F]+)*$")
|
||||||
const iCityFields = iFormFieldValues.filter(f => Annotation.isCityField(f))
|
const iCityFields = iFormFieldValues.filter(f => isCityField(f))
|
||||||
for (var f of iCityFields)
|
for (var f of iCityFields)
|
||||||
if (!IS_MOBILE_DEVICE && !city_regex.test(f.value)) {
|
if (!IS_MOBILE_DEVICE && !city_regex.test(f.value)) {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
@@ -322,7 +322,7 @@ class App {
|
|||||||
|
|
||||||
|
|
||||||
async validateAnnotations(totalSignatures) {
|
async validateAnnotations(totalSignatures) {
|
||||||
const annotations = await Annotation.getAnnotations(this.Instance)
|
const annotations = await getAnnotations(this.Instance)
|
||||||
const filtered = annotations
|
const filtered = annotations
|
||||||
.map(a => a.toJS())
|
.map(a => a.toJS())
|
||||||
.filter(a => a.isSignature)
|
.filter(a => a.isSignature)
|
||||||
@@ -343,7 +343,7 @@ class App {
|
|||||||
})
|
})
|
||||||
|
|
||||||
if (result.isConfirmed) {
|
if (result.isConfirmed) {
|
||||||
const result = await Annotation.deleteAnnotations(this.Instance)
|
const result = await deleteAnnotations(this.Instance)
|
||||||
}
|
}
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|||||||
4
EnvelopeGenerator.Web/wwwroot/js/app.min.js
vendored
4
EnvelopeGenerator.Web/wwwroot/js/app.min.js
vendored
@@ -1,3 +1,3 @@
|
|||||||
const ActionType={Created:0,Saved:1,Sent:2,EmailSent:3,Delivered:4,Seen:5,Signed:6,Rejected:7};class App{constructor(n,t,i,r,u,f){this.container=f??`#${this.constructor.name.toLowerCase()}`;this.envelopeKey=n;this.Network=new Network;this.Instance=null;this.currentDocument=null;this.currentReceiver=null;this.signatureCount=0;this.envelopeReceiver=t;this.documentBytes=i;this.licenseKey=r;this.locale=u}async init(){this.currentDocument=this.envelopeReceiver.envelope.documents[0];this.currentReceiver=this.envelopeReceiver.receiver;const n=this.documentBytes;if(n.fatal||n.error)return Swal.fire({title:"Fehler",text:"Dokument konnte nicht geladen werden!",icon:"error"});const t=this.documentBytes;this.Instance=await UI.loadPSPDFKit(t,this.container,this.licenseKey,this.locale);UI.addToolbarItems(this.Instance,this.handleClick.bind(this));this.Instance.addEventListener("annotations.load",this.handleAnnotationsLoad.bind(this));this.Instance.addEventListener("annotations.change",this.handleAnnotationsChange.bind(this));this.Instance.addEventListener("annotations.create",this.handleAnnotationsCreate.bind(this));this.Instance.addEventListener("annotations.willChange",()=>{Comp.ActPanel.Toggle()});try{this.signatureCount=this.currentDocument.elements.length;await Annotation.createAnnotations(this.currentDocument,this.Instance);const n=await this.Network.openDocument(this.envelopeKey);if(n.fatal||n.error)return Swal.fire({title:"Fehler",text:"Umschlag konnte nicht geöffnet werden!",icon:"error"})}catch(i){}[...document.getElementsByClassName("btn_refresh")].forEach(n=>n.addEventListener("click",()=>this.handleClick("RESET")));[...document.getElementsByClassName("btn_complete")].forEach(n=>n.addEventListener("click",()=>this.handleClick("FINISH")));[...document.getElementsByClassName("btn_reject")].forEach(n=>n.addEventListener("click",()=>this.handleClick("REJECT")))}handleAnnotationsLoad(n){n.toJS()}handleAnnotationsChange(){}async handleAnnotationsCreate(n){const t=n.toJS()[0],i=!!t.formFieldName,r=!!t.isSignature;if(i===!1&&r===!0){const r=t.boundingBox.left-20,u=t.boundingBox.top-20,n=150,i=75,f=new Date,e=await Annotation.createAnnotationFrameBlob(this.envelopeReceiver.name,this.currentReceiver.signature,f,n,i),o=await fetch(e),s=await o.blob(),h=await this.Instance.createAttachment(s),c=Annotation.createImageAnnotation(new PSPDFKit.Geometry.Rect({left:r,top:u,width:n,height:i}),t.pageIndex,h);this.Instance.create(c)}}async handleClick(n){let t=!1;switch(n){case"RESET":t=await this.handleReset(null);Comp.SignatureProgress.SignedCount=0;t.isConfirmed&&Swal.fire({title:"Erfolg",text:"Dokument wurde zurückgesetzt",icon:"info"});break;case"FINISH":t=await this.handleFinish(null);t==!0&&(window.location.href=`/EnvelopeKey/${this.envelopeKey}/Success`);break;case"REJECT":Swal.fire({title:localized.rejection,html:`<div class="text-start fs-6 p-0 m-0">${localized.rejectionReasonQ}</div>`,icon:"question",input:"text",inputAttributes:{autocapitalize:"off"},showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:localized.complete,cancelButtonText:localized.back,showLoaderOnConfirm:!0,preConfirm:async n=>{try{return await rejectEnvelope(n)}catch(t){Swal.showValidationMessage(`
|
const ActionType={Created:0,Saved:1,Sent:2,EmailSent:3,Delivered:4,Seen:5,Signed:6,Rejected:7};class App{constructor(n,t,i,r,u,f){this.container=f??`#${this.constructor.name.toLowerCase()}`;this.envelopeKey=n;this.Network=new Network;this.Instance=null;this.currentDocument=null;this.currentReceiver=null;this.signatureCount=0;this.envelopeReceiver=t;this.documentBytes=i;this.licenseKey=r;this.locale=u}async init(){this.currentDocument=this.envelopeReceiver.envelope.documents[0];this.currentReceiver=this.envelopeReceiver.receiver;const n=this.documentBytes;if(n.fatal||n.error)return Swal.fire({title:"Fehler",text:"Dokument konnte nicht geladen werden!",icon:"error"});const t=this.documentBytes;this.Instance=await UI.loadPSPDFKit(t,this.container,this.licenseKey,this.locale);UI.addToolbarItems(this.Instance,this.handleClick.bind(this));this.Instance.addEventListener("annotations.load",this.handleAnnotationsLoad.bind(this));this.Instance.addEventListener("annotations.change",this.handleAnnotationsChange.bind(this));this.Instance.addEventListener("annotations.create",this.handleAnnotationsCreate.bind(this));this.Instance.addEventListener("annotations.willChange",()=>{Comp.ActPanel.Toggle()});try{this.signatureCount=this.currentDocument.elements.length;await createAnnotations(this.currentDocument,this.Instance);const n=await this.Network.openDocument(this.envelopeKey);if(n.fatal||n.error)return Swal.fire({title:"Fehler",text:"Umschlag konnte nicht geöffnet werden!",icon:"error"})}catch(i){}[...document.getElementsByClassName("btn_refresh")].forEach(n=>n.addEventListener("click",()=>this.handleClick("RESET")));[...document.getElementsByClassName("btn_complete")].forEach(n=>n.addEventListener("click",()=>this.handleClick("FINISH")));[...document.getElementsByClassName("btn_reject")].forEach(n=>n.addEventListener("click",()=>this.handleClick("REJECT")))}handleAnnotationsLoad(n){n.toJS()}handleAnnotationsChange(){}async handleAnnotationsCreate(n){const t=n.toJS()[0],i=!!t.formFieldName,r=!!t.isSignature;if(i===!1&&r===!0){const r=t.boundingBox.left-20,u=t.boundingBox.top-20,n=150,i=75,f=new Date,e=await createAnnotationFrameBlob(this.envelopeReceiver.name,this.currentReceiver.signature,f,n,i),o=await fetch(e),s=await o.blob(),h=await this.Instance.createAttachment(s),c=createImageAnnotation(new PSPDFKit.Geometry.Rect({left:r,top:u,width:n,height:i}),t.pageIndex,h);this.Instance.create(c)}}async handleClick(n){let t=!1;switch(n){case"RESET":t=await this.handleReset(null);Comp.SignatureProgress.SignedCount=0;t.isConfirmed&&Swal.fire({title:"Erfolg",text:"Dokument wurde zurückgesetzt",icon:"info"});break;case"FINISH":t=await this.handleFinish(null);t==!0&&(window.location.href=`/EnvelopeKey/${this.envelopeKey}/Success`);break;case"REJECT":Swal.fire({title:localized.rejection,html:`<div class="text-start fs-6 p-0 m-0">${localized.rejectionReasonQ}</div>`,icon:"question",input:"text",inputAttributes:{autocapitalize:"off"},showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:localized.complete,cancelButtonText:localized.back,showLoaderOnConfirm:!0,preConfirm:async n=>{try{return await rejectEnvelope(n)}catch(t){Swal.showValidationMessage(`
|
||||||
Request failed: ${t}
|
Request failed: ${t}
|
||||||
`)}},allowOutsideClick:()=>!Swal.isLoading()}).then(n=>{if(n.isConfirmed){const t=n.value;t.ok?redirRejected():Swal.showValidationMessage(`Request failed: ${t.message}`)}});break;case"COPY_URL":const n=window.location.href.replace(/\/readonly/gi,"");navigator.clipboard.writeText(n).then(function(){bsNotify("Kopiert",{alert_type:"success",delay:4,icon_name:"check_circle"})}).catch(function(){bsNotify("Unerwarteter Fehler",{alert_type:"danger",delay:4,icon_name:"error"})});break;case"SHARE":Comp.ShareBackdrop.show();break;case"LOGOUT":await logout()}}async handleFinish(){const n=await this.Instance.exportInstantJSON(),t=await n.formFieldValues,r=t.filter(n=>Annotation.isFieldRequired(n)),u=r.some(n=>n.value===undefined||n.value===null||n.value==="");if(u)return Swal.fire({title:"Warnung",text:"Bitte füllen Sie alle Standortinformationen vollständig aus!",icon:"warning"}),!1;const f=new RegExp("^[a-zA-Z\\u0080-\\u024F]+(?:([\\ \\-\\']|(\\.\\ ))[a-zA-Z\\u0080-\\u024F]+)*$"),e=t.filter(n=>Annotation.isCityField(n));for(var i of e)if(!IS_MOBILE_DEVICE&&!f.test(i.value))return Swal.fire({title:"Warnung",text:`Bitte überprüfen Sie die eingegebene Ortsangabe "${i.value}" auf korrekte Formatierung. Beispiele für richtige Formate sind: München, Île-de-France, Sauðárkrókur, San Francisco, St. Catharines usw.`,icon:"warning"}),!1;const o=await this.validateAnnotations(this.signatureCount);return o===!1?(Swal.fire({title:"Warnung",text:"Es wurden nicht alle Signaturfelder ausgefüllt!",icon:"warning"}),!1):Swal.fire({title:localized.confirmation,html:`<div class="text-start fs-6 p-0 m-0">${localized.sigAgree}</div>`,icon:"question",showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:localized.finalize,cancelButtonText:localized.back}).then(async t=>{if(t.isConfirmed){try{await this.Instance.save()}catch(i){return Swal.fire({title:"Fehler",text:"Umschlag konnte nicht signiert werden!",icon:"error"}),!1}try{const i=await n,t=await this.Network.postEnvelope(this.envelopeKey,this.currentDocument.id,i);return t.fatal?(Swal.fire({title:"Fehler",text:"Umschlag konnte nicht signiert werden!",icon:"error"}),!1):t.error?(Swal.fire({title:"Warnung",text:"Umschlag ist nicht mehr verfügbar.",icon:"warning"}),!1):!0}catch(i){return!1}}else return!1})}async validateAnnotations(n){const t=await Annotation.getAnnotations(this.Instance),i=t.map(n=>n.toJS()).filter(n=>n.isSignature);return n>i.length?!1:!0}async handleReset(){const n=await Swal.fire({title:"Sind sie sicher?",text:"Wollen Sie das Dokument und alle erstellten Signaturen zurücksetzen?",icon:"question",showCancelButton:!0});if(n.isConfirmed){const n=await Annotation.deleteAnnotations(this.Instance)}return n}}
|
`)}},allowOutsideClick:()=>!Swal.isLoading()}).then(n=>{if(n.isConfirmed){const t=n.value;t.ok?redirRejected():Swal.showValidationMessage(`Request failed: ${t.message}`)}});break;case"COPY_URL":const n=window.location.href.replace(/\/readonly/gi,"");navigator.clipboard.writeText(n).then(function(){bsNotify("Kopiert",{alert_type:"success",delay:4,icon_name:"check_circle"})}).catch(function(){bsNotify("Unerwarteter Fehler",{alert_type:"danger",delay:4,icon_name:"error"})});break;case"SHARE":Comp.ShareBackdrop.show();break;case"LOGOUT":await logout()}}async handleFinish(){const n=await this.Instance.exportInstantJSON(),t=await n.formFieldValues,r=t.filter(n=>isFieldRequired(n)),u=r.some(n=>n.value===undefined||n.value===null||n.value==="");if(u)return Swal.fire({title:"Warnung",text:"Bitte füllen Sie alle Standortinformationen vollständig aus!",icon:"warning"}),!1;const f=new RegExp("^[a-zA-Z\\u0080-\\u024F]+(?:([\\ \\-\\']|(\\.\\ ))[a-zA-Z\\u0080-\\u024F]+)*$"),e=t.filter(n=>isCityField(n));for(var i of e)if(!IS_MOBILE_DEVICE&&!f.test(i.value))return Swal.fire({title:"Warnung",text:`Bitte überprüfen Sie die eingegebene Ortsangabe "${i.value}" auf korrekte Formatierung. Beispiele für richtige Formate sind: München, Île-de-France, Sauðárkrókur, San Francisco, St. Catharines usw.`,icon:"warning"}),!1;const o=await this.validateAnnotations(this.signatureCount);return o===!1?(Swal.fire({title:"Warnung",text:"Es wurden nicht alle Signaturfelder ausgefüllt!",icon:"warning"}),!1):Swal.fire({title:localized.confirmation,html:`<div class="text-start fs-6 p-0 m-0">${localized.sigAgree}</div>`,icon:"question",showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:localized.finalize,cancelButtonText:localized.back}).then(async t=>{if(t.isConfirmed){try{await this.Instance.save()}catch(i){return Swal.fire({title:"Fehler",text:"Umschlag konnte nicht signiert werden!",icon:"error"}),!1}try{const i=await n,t=await this.Network.postEnvelope(this.envelopeKey,this.currentDocument.id,i);return t.fatal?(Swal.fire({title:"Fehler",text:"Umschlag konnte nicht signiert werden!",icon:"error"}),!1):t.error?(Swal.fire({title:"Warnung",text:"Umschlag ist nicht mehr verfügbar.",icon:"warning"}),!1):!0}catch(i){return!1}}else return!1})}async validateAnnotations(n){const t=await getAnnotations(this.Instance),i=t.map(n=>n.toJS()).filter(n=>n.isSignature);return n>i.length?!1:!0}async handleReset(){const n=await Swal.fire({title:"Sind sie sicher?",text:"Wollen Sie das Dokument und alle erstellten Signaturen zurücksetzen?",icon:"question",showCancelButton:!0});if(n.isConfirmed){const n=await deleteAnnotations(this.Instance)}return n}}
|
||||||
@@ -69,7 +69,7 @@
|
|||||||
* Creates a GET HTTP request to `url`
|
* Creates a GET HTTP request to `url`
|
||||||
* @param {any} url
|
* @param {any} url
|
||||||
*/
|
*/
|
||||||
getRequest(url, body) {
|
getRequest(url) {
|
||||||
const token = this.getCSRFToken()
|
const token = this.getCSRFToken()
|
||||||
const options = {
|
const options = {
|
||||||
credentials: 'include',
|
credentials: 'include',
|
||||||
@@ -79,10 +79,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (body !== undefined) {
|
|
||||||
options.body = JSON.stringify(body);
|
|
||||||
}
|
|
||||||
|
|
||||||
return fetch(url, options)
|
return fetch(url, options)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -206,4 +202,24 @@ async function logout() {
|
|||||||
if (res.ok)
|
if (res.ok)
|
||||||
window.location.href = "/";
|
window.location.href = "/";
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function getAnnotationParams(leftInInch = 0, topInInch = 0, inchToPointFactor = 72) {
|
||||||
|
return fetch(`${window.location.origin}/api/Config/Annotations`, {
|
||||||
|
credentials: 'include',
|
||||||
|
method: 'GET'
|
||||||
|
})
|
||||||
|
.then(res => res.json())
|
||||||
|
.then(annotParams => {
|
||||||
|
for(var key in annotParams){
|
||||||
|
var annot = annotParams[key];
|
||||||
|
annot.width *= inchToPointFactor;
|
||||||
|
annot.height *= inchToPointFactor;
|
||||||
|
annot.left += leftInInch;
|
||||||
|
annot.left *= inchToPointFactor;
|
||||||
|
annot.top += topInInch;
|
||||||
|
annot.top *= inchToPointFactor;
|
||||||
|
}
|
||||||
|
return annotParams;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
@@ -1 +1 @@
|
|||||||
async function setLangAsync(n,t){document.getElementById("selectedFlag").className="fi "+t+" me-2";await fetch(`/lang/${n}`,{method:"POST",headers:{"Content-Type":"application/json"}})}async function setLanguage(n){const t=await fetch("/lang",{method:"GET",headers:{"Content-Type":"application/json"}}).then(n=>n.json()).then(t=>t.includes(n)).catch(()=>!1);if(t)return await fetch(`/lang/${n}`,{method:"POST",headers:{"Content-Type":"application/json"}}).then(n=>{if(n.redirected)window.location.href=n.url;else if(!n.ok)return Promise.reject("Failed to set language")})}async function logout(){return await fetch(`/auth/logout`,{method:"POST",headers:{"Content-Type":"application/json"}}).then(n=>{n.ok&&(window.location.href="/")})}class Network{async getEnvelope(n){return this.getRequest(`/api/envelope/${n}`).then(this.wrapJsonResponse.bind(this))}async postEnvelope(n,t,i){return this.postRequest(`/api/envelope/${n}?index=${t}`,i).then(this.wrapJsonResponse.bind(this))}async getDocument(n,t){return this.getRequest(`/api/document/${n}?index=${t}`).then(this.wrapBinaryResponse.bind(this))}async openDocument(n){return this.postRequest(`/api/document/${n}`,{}).then(this.wrapJsonResponse.bind(this))}withCSRFToken(n){const t=getCSRFToken;let i=n.headers;return n.headers={...i,...t},n}getCSRFToken(){const n=document.getElementsByName("__RequestVerificationToken")[0].value;return{"X-XSRF-TOKEN":n}}getRequest(n,t){const r=this.getCSRFToken(),i={credentials:"include",method:"GET",headers:{...r}};return t!==undefined&&(i.body=JSON.stringify(t)),fetch(n,i)}postRequest(n,t){const i=this.getCSRFToken(),r={credentials:"include",method:"POST",headers:{...i,"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify(t)};return fetch(n,r)}async wrapJsonResponse(n){return await this.wrapResponse(n,async n=>await n.json())}async wrapBinaryResponse(n){return await this.wrapResponse(n,async n=>await n.arrayBuffer())}async wrapResponse(n,t){let i;if(n.status===200){const r=await t(n);i=new WrappedResponse(r,null)}else if(n.status===403){const t=await n.json();i=new WrappedResponse(null,t)}else i=new WrappedResponse(null,null);return i}}class WrappedResponse{constructor(n,t){this.data=n;this.error=t;this.fatal=n===null&&t===null}}
|
async function setLangAsync(n,t){document.getElementById("selectedFlag").className="fi "+t+" me-2";await fetch(`/lang/${n}`,{method:"POST",headers:{"Content-Type":"application/json"}})}async function setLanguage(n){const t=await fetch("/lang",{method:"GET",headers:{"Content-Type":"application/json"}}).then(n=>n.json()).then(t=>t.includes(n)).catch(()=>!1);if(t)return await fetch(`/lang/${n}`,{method:"POST",headers:{"Content-Type":"application/json"}}).then(n=>{if(n.redirected)window.location.href=n.url;else if(!n.ok)return Promise.reject("Failed to set language")})}async function logout(){return await fetch(`/auth/logout`,{method:"POST",headers:{"Content-Type":"application/json"}}).then(n=>{n.ok&&(window.location.href="/")})}function getAnnotationParams(n=0,t=0,i=72){return fetch(`${window.location.origin}/api/Config/Annotations`,{credentials:"include",method:"GET"}).then(n=>n.json()).then(r=>{var f,u;for(f in r)u=r[f],u.width*=i,u.height*=i,u.left+=n,u.left*=i,u.top+=t,u.top*=i;return r})}class Network{async getEnvelope(n){return this.getRequest(`/api/envelope/${n}`).then(this.wrapJsonResponse.bind(this))}async postEnvelope(n,t,i){return this.postRequest(`/api/envelope/${n}?index=${t}`,i).then(this.wrapJsonResponse.bind(this))}async getDocument(n,t){return this.getRequest(`/api/document/${n}?index=${t}`).then(this.wrapBinaryResponse.bind(this))}async openDocument(n){return this.postRequest(`/api/document/${n}`,{}).then(this.wrapJsonResponse.bind(this))}withCSRFToken(n){const t=getCSRFToken;let i=n.headers;return n.headers={...i,...t},n}getCSRFToken(){const n=document.getElementsByName("__RequestVerificationToken")[0].value;return{"X-XSRF-TOKEN":n}}getRequest(n){const t=this.getCSRFToken(),i={credentials:"include",method:"GET",headers:{...t}};return fetch(n,i)}postRequest(n,t){const i=this.getCSRFToken(),r={credentials:"include",method:"POST",headers:{...i,"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify(t)};return fetch(n,r)}async wrapJsonResponse(n){return await this.wrapResponse(n,async n=>await n.json())}async wrapBinaryResponse(n){return await this.wrapResponse(n,async n=>await n.arrayBuffer())}async wrapResponse(n,t){let i;if(n.status===200){const r=await t(n);i=new WrappedResponse(r,null)}else if(n.status===403){const t=await n.json();i=new WrappedResponse(null,t)}else i=new WrappedResponse(null,null);return i}}class WrappedResponse{constructor(n,t){this.data=n;this.error=t;this.fatal=n===null&&t===null}}
|
||||||
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
|||||||
# Visual Studio Version 17
|
# Visual Studio Version 17
|
||||||
VisualStudioVersion = 17.5.33516.290
|
VisualStudioVersion = 17.5.33516.290
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "EnvelopeGenerator.Test", "EnvelopeGenerator.Test\EnvelopeGenerator.Test.vbproj", "{089D5634-FB6B-42D0-B912-7AA7457044E7}"
|
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "EnvelopeGenerator.BBTests", "EnvelopeGenerator.BBTests\EnvelopeGenerator.BBTests.vbproj", "{089D5634-FB6B-42D0-B912-7AA7457044E7}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "EnvelopeGenerator.Form", "EnvelopeGenerator.Form\EnvelopeGenerator.Form.vbproj", "{6D56C01F-D6CB-4D8A-BD3D-4FD34326998C}"
|
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "EnvelopeGenerator.Form", "EnvelopeGenerator.Form\EnvelopeGenerator.Form.vbproj", "{6D56C01F-D6CB-4D8A-BD3D-4FD34326998C}"
|
||||||
EndProject
|
EndProject
|
||||||
@@ -23,7 +23,17 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EnvelopeGenerator.Generator
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EnvelopeGenerator.Extensions", "EnvelopeGenerator.Extensions\EnvelopeGenerator.Extensions.csproj", "{47F98812-4280-4D53-B04A-2AAEEA5EBC31}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EnvelopeGenerator.Extensions", "EnvelopeGenerator.Extensions\EnvelopeGenerator.Extensions.csproj", "{47F98812-4280-4D53-B04A-2AAEEA5EBC31}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Core", "Core", "{614BEFFA-C745-4736-84BD-A64108B4C659}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "core", "core", "{9943209E-1744-4944-B1BA-4F87FC1A0EEB}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{134D4164-B291-4E19-99B9-E4FA3AFAB62C}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{0CBC2432-A561-4440-89BC-671B66A24146}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EnvelopeGenerator.Tests.Application", "EnvelopeGenerator.Tests.Application\EnvelopeGenerator.Tests.Application.csproj", "{A4D0DD1A-67BC-4E1A-AD29-BC4BC0D41399}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "infrastructure", "infrastructure", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "presentation", "presentation", "{E3C758DC-914D-4B7E-8457-0813F1FDB0CB}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
@@ -33,8 +43,8 @@ Global
|
|||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{089D5634-FB6B-42D0-B912-7AA7457044E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{089D5634-FB6B-42D0-B912-7AA7457044E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{089D5634-FB6B-42D0-B912-7AA7457044E7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{089D5634-FB6B-42D0-B912-7AA7457044E7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{089D5634-FB6B-42D0-B912-7AA7457044E7}.Release|Any CPU.ActiveCfg = Debug|Any CPU
|
{089D5634-FB6B-42D0-B912-7AA7457044E7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{089D5634-FB6B-42D0-B912-7AA7457044E7}.Release|Any CPU.Build.0 = Debug|Any CPU
|
{089D5634-FB6B-42D0-B912-7AA7457044E7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{6D56C01F-D6CB-4D8A-BD3D-4FD34326998C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{6D56C01F-D6CB-4D8A-BD3D-4FD34326998C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{6D56C01F-D6CB-4D8A-BD3D-4FD34326998C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{6D56C01F-D6CB-4D8A-BD3D-4FD34326998C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{6D56C01F-D6CB-4D8A-BD3D-4FD34326998C}.Release|Any CPU.ActiveCfg = Debug|Any CPU
|
{6D56C01F-D6CB-4D8A-BD3D-4FD34326998C}.Release|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
@@ -71,13 +81,29 @@ Global
|
|||||||
{47F98812-4280-4D53-B04A-2AAEEA5EBC31}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{47F98812-4280-4D53-B04A-2AAEEA5EBC31}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{47F98812-4280-4D53-B04A-2AAEEA5EBC31}.Release|Any CPU.ActiveCfg = Debug|Any CPU
|
{47F98812-4280-4D53-B04A-2AAEEA5EBC31}.Release|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{47F98812-4280-4D53-B04A-2AAEEA5EBC31}.Release|Any CPU.Build.0 = Debug|Any CPU
|
{47F98812-4280-4D53-B04A-2AAEEA5EBC31}.Release|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{A4D0DD1A-67BC-4E1A-AD29-BC4BC0D41399}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{A4D0DD1A-67BC-4E1A-AD29-BC4BC0D41399}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{A4D0DD1A-67BC-4E1A-AD29-BC4BC0D41399}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{A4D0DD1A-67BC-4E1A-AD29-BC4BC0D41399}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(NestedProjects) = preSolution
|
GlobalSection(NestedProjects) = preSolution
|
||||||
{4F32A98D-E6F0-4A09-BD97-1CF26107E837} = {614BEFFA-C745-4736-84BD-A64108B4C659}
|
{089D5634-FB6B-42D0-B912-7AA7457044E7} = {0CBC2432-A561-4440-89BC-671B66A24146}
|
||||||
{5A9984F8-51A2-4558-A415-EC5FEED7CF7D} = {614BEFFA-C745-4736-84BD-A64108B4C659}
|
{6D56C01F-D6CB-4D8A-BD3D-4FD34326998C} = {E3C758DC-914D-4B7E-8457-0813F1FDB0CB}
|
||||||
|
{6EA0C51F-C2B1-4462-8198-3DE0B32B74F8} = {9943209E-1744-4944-B1BA-4F87FC1A0EEB}
|
||||||
|
{5E0E17C0-FF5A-4246-BF87-1ADD85376A27} = {E3C758DC-914D-4B7E-8457-0813F1FDB0CB}
|
||||||
|
{83ED2617-B398-4859-8F59-B38F8807E83E} = {9943209E-1744-4944-B1BA-4F87FC1A0EEB}
|
||||||
|
{4F32A98D-E6F0-4A09-BD97-1CF26107E837} = {9943209E-1744-4944-B1BA-4F87FC1A0EEB}
|
||||||
|
{63E32615-0ECA-42DC-96E3-91037324B7C7} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
|
||||||
|
{5A9984F8-51A2-4558-A415-EC5FEED7CF7D} = {9943209E-1744-4944-B1BA-4F87FC1A0EEB}
|
||||||
|
{E5E12BA4-60C1-48BA-9053-0F8B62B38124} = {E3C758DC-914D-4B7E-8457-0813F1FDB0CB}
|
||||||
|
{47F98812-4280-4D53-B04A-2AAEEA5EBC31} = {9943209E-1744-4944-B1BA-4F87FC1A0EEB}
|
||||||
|
{9943209E-1744-4944-B1BA-4F87FC1A0EEB} = {134D4164-B291-4E19-99B9-E4FA3AFAB62C}
|
||||||
|
{A4D0DD1A-67BC-4E1A-AD29-BC4BC0D41399} = {0CBC2432-A561-4440-89BC-671B66A24146}
|
||||||
|
{02EA681E-C7D8-13C7-8484-4AC65E1B71E8} = {134D4164-B291-4E19-99B9-E4FA3AFAB62C}
|
||||||
|
{E3C758DC-914D-4B7E-8457-0813F1FDB0CB} = {134D4164-B291-4E19-99B9-E4FA3AFAB62C}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
SolutionGuid = {73E60370-756D-45AD-A19A-C40A02DACCC7}
|
SolutionGuid = {73E60370-756D-45AD-A19A-C40A02DACCC7}
|
||||||
|
|||||||
Reference in New Issue
Block a user