Funktion zur Behebung der Rotation - Class EnvelopeEditorController, Class FixPageRotation

This commit is contained in:
OlgunR
2025-04-22 10:26:03 +02:00
parent 7481691b4e
commit 4d34eb7adc
3 changed files with 55 additions and 2 deletions

View File

@@ -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