Compare commits
4 Commits
abd1807b18
...
bugfix/sig
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4d34eb7adc | ||
|
|
7481691b4e | ||
|
|
0d635830f9 | ||
|
|
9b72a7b472 |
@@ -156,7 +156,11 @@ Public Class EnvelopeEditorController
|
||||
|
||||
Public Async Function CreateDocument(pDocumentFilePath As String) As Threading.Tasks.Task(Of EnvelopeDocument)
|
||||
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 oTempFilePath = Path.Combine(oTempFiles._TempPath, Guid.NewGuid().ToString + oFileInfo.Extension)
|
||||
|
||||
@@ -172,7 +176,7 @@ Public Class EnvelopeEditorController
|
||||
.FileNameOriginal = oFileInfo.Name,
|
||||
.Thumbnail = Thumbnail.GetThumbnailFromPDFFile(oTempFilePath),
|
||||
.PageCount = Thumbnail.GetPageCount(oTempFilePath),
|
||||
.Byte_Data = ReadFile(pDocumentFilePath)
|
||||
.Byte_Data = ReadFile(oFixedPath)
|
||||
}
|
||||
|
||||
Return oDocument
|
||||
|
||||
@@ -77,8 +77,8 @@
|
||||
<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.XtraTreeList.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||
<Reference Include="DigitalData.Controls.DocumentViewer, Version=1.9.7.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\DigitalData.Controls.DocumentViewer.1.9.7\lib\net462\DigitalData.Controls.DocumentViewer.dll</HintPath>
|
||||
<Reference Include="DigitalData.Controls.DocumentViewer, Version=1.9.8.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\DigitalData.Controls.DocumentViewer.1.9.8\lib\net462\DigitalData.Controls.DocumentViewer.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DigitalData.GUIs.Common">
|
||||
<HintPath>..\..\2_DLL Projekte\DDMonorepo\GUIs.Common\bin\Debug\DigitalData.GUIs.Common.dll</HintPath>
|
||||
@@ -116,9 +116,6 @@
|
||||
<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>
|
||||
</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">
|
||||
<HintPath>..\packages\FirebirdSql.Data.FirebirdClient.7.5.0\lib\net452\FirebirdSql.Data.FirebirdClient.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -186,6 +183,9 @@
|
||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.wia.gateway.dll</HintPath>
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
</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">
|
||||
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.9.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -362,6 +362,7 @@
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Helper\Encryption.vb" />
|
||||
<Compile Include="Helper\FixPageRotation.vb" />
|
||||
<Compile Include="Helper\RefreshHelper.vb" />
|
||||
<Compile Include="Helper\TempFiles.vb" />
|
||||
<Compile Include="Helper\Thumbnail.vb" />
|
||||
@@ -464,10 +465,7 @@
|
||||
<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="Images\circle.svg" />
|
||||
<Content Include="MailLicense.xml">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="MailLicense.xml" />
|
||||
<Content Include="README.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -475,6 +473,10 @@
|
||||
<Project>{6EA0C51F-C2B1-4462-8198-3DE0B32B74F8}</Project>
|
||||
<Name>EnvelopeGenerator.Common</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\EnvelopeGenerator.Common\EnvelopeGenerator.Common.vbproj">
|
||||
<Project>{6ea0c51f-c2b1-4462-8198-3de0b32b74f8}</Project>
|
||||
<Name>EnvelopeGenerator.Common</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<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()
|
||||
End Sub
|
||||
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
|
||||
|
||||
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)
|
||||
oEmailAdress = Trim(oEmailAdress)
|
||||
If IsValidEmailAddress(oEmailAdress) = True Then
|
||||
Dim oAccessCode As String = ""
|
||||
Dim oLastName As String = Controller.GetLastNameByEmailAdress(oEmailAdress)
|
||||
Dim oAccessCode As String = Helpers.GetAccessCode()
|
||||
'oAccessCode = Helpers.GetAccessCode()
|
||||
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_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
|
||||
ViewReceivers.SetRowCellValue(e.RowHandle, ViewReceivers.Columns.Item(COL_PHONE), oPhoneNumber)
|
||||
End If
|
||||
If ViewReceivers.GetRowCellValue(e.RowHandle, ViewReceivers.Columns.Item(COL_CODE)) = String.Empty Then
|
||||
CheckAccesscode(e.RowHandle, oAccessCode)
|
||||
End If
|
||||
Else
|
||||
Dim oMsg = Resources.Envelope.Error_email_Validation
|
||||
Dim oMsg = Resources.Envelope.Error_email_Validation
|
||||
oMsg = oMsg.Replace("@Mail", oEmailAdress)
|
||||
MsgBox(oMsg, MsgBoxStyle.Exclamation, Text)
|
||||
ViewReceivers.DeleteRow(ViewReceivers.FocusedRowHandle)
|
||||
@@ -620,6 +621,12 @@ Partial Public Class frmEnvelopeEditor
|
||||
CellValueChanged = False
|
||||
End If
|
||||
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
|
||||
Try
|
||||
If pEmailAddress.Contains("@") Then
|
||||
|
||||
@@ -282,6 +282,7 @@
|
||||
'
|
||||
'frmFieldEditor
|
||||
'
|
||||
Me.Appearance.Options.UseFont = True
|
||||
resources.ApplyResources(Me, "$this")
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.Controls.Add(Me.SplitContainerControl1)
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
</data>
|
||||
<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">
|
||||
<value>0, 132</value>
|
||||
<value>0, 59</value>
|
||||
</data>
|
||||
<data name="ThumbnailEx2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
@@ -132,7 +132,7 @@
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="ThumbnailEx2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>199, 526</value>
|
||||
<value>199, 600</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="ThumbnailEx2.TabIndex" type="System.Int32, mscorlib">
|
||||
@@ -142,7 +142,7 @@
|
||||
<value>ThumbnailEx2</value>
|
||||
</data>
|
||||
<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 name=">>ThumbnailEx2.Parent" xml:space="preserve">
|
||||
<value>SplitContainerControl1.Panel1</value>
|
||||
@@ -172,7 +172,7 @@
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="DocumentViewer1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>916, 526</value>
|
||||
<value>917, 600</value>
|
||||
</data>
|
||||
<data name="DocumentViewer1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
@@ -181,7 +181,7 @@
|
||||
<value>DocumentViewer1</value>
|
||||
</data>
|
||||
<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 name=">>DocumentViewer1.Parent" xml:space="preserve">
|
||||
<value>SplitContainerControl1.Panel2</value>
|
||||
@@ -205,7 +205,7 @@
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="SplitContainerControl1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1125, 526</value>
|
||||
<value>1126, 600</value>
|
||||
</data>
|
||||
<data name="SplitContainerControl1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>15</value>
|
||||
@@ -397,7 +397,7 @@
|
||||
<value>Combo</value>
|
||||
</data>
|
||||
<data name="ribbonControl1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1125, 132</value>
|
||||
<value>1126, 88</value>
|
||||
</data>
|
||||
<data name=">>ribbonControl1.Name" xml:space="preserve">
|
||||
<value>ribbonControl1</value>
|
||||
@@ -427,7 +427,7 @@
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="barDockControlTop.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1125, 0</value>
|
||||
<value>1126, 0</value>
|
||||
</data>
|
||||
<data name=">>barDockControlTop.Name" xml:space="preserve">
|
||||
<value>barDockControlTop</value>
|
||||
@@ -445,10 +445,10 @@
|
||||
<value>Bottom</value>
|
||||
</data>
|
||||
<data name="barDockControlBottom.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 658</value>
|
||||
<value>0, 659</value>
|
||||
</data>
|
||||
<data name="barDockControlBottom.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1125, 0</value>
|
||||
<value>1126, 0</value>
|
||||
</data>
|
||||
<data name=">>barDockControlBottom.Name" xml:space="preserve">
|
||||
<value>barDockControlBottom</value>
|
||||
@@ -469,7 +469,7 @@
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="barDockControlLeft.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>0, 658</value>
|
||||
<value>0, 659</value>
|
||||
</data>
|
||||
<data name=">>barDockControlLeft.Name" xml:space="preserve">
|
||||
<value>barDockControlLeft</value>
|
||||
@@ -487,10 +487,10 @@
|
||||
<value>Right</value>
|
||||
</data>
|
||||
<data name="barDockControlRight.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>1125, 0</value>
|
||||
<value>1126, 0</value>
|
||||
</data>
|
||||
<data name="barDockControlRight.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>0, 658</value>
|
||||
<value>0, 659</value>
|
||||
</data>
|
||||
<data name=">>barDockControlRight.Name" xml:space="preserve">
|
||||
<value>barDockControlRight</value>
|
||||
@@ -511,7 +511,7 @@
|
||||
<value>6, 13</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1125, 658</value>
|
||||
<value>1689, 988</value>
|
||||
</data>
|
||||
<data name="$this.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 8.25pt</value>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="BouncyCastle.Cryptography" version="2.5.0" targetFramework="net462" />
|
||||
<package id="DigitalData.Controls.DocumentViewer" version="1.9.7" 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.Config" version="1.3.0" targetFramework="net462" />
|
||||
<package id="DigitalData.Modules.Database" version="2.3.5.4" targetFramework="net462" />
|
||||
@@ -12,7 +12,6 @@
|
||||
<package id="DocumentFormat.OpenXml.Framework" version="3.2.0" targetFramework="net462" />
|
||||
<package id="EntityFramework" version="6.4.4" 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="GdPicture" version="14.3.3" targetFramework="net462" />
|
||||
<package id="GdPicture.runtimes.windows" version="14.3.3" targetFramework="net462" />
|
||||
|
||||
Reference in New Issue
Block a user