MS Sync Hakan
This commit is contained in:
@@ -43,6 +43,7 @@ Namespace Jobs
|
||||
|
||||
Private ReadOnly CompleteWaitTime As Integer = 5
|
||||
Private ParentFolderUID As String = ""
|
||||
Private myTempFiles As TempFiles
|
||||
|
||||
Private Class EnvelopeData
|
||||
Public EnvelopeId As Integer
|
||||
@@ -56,7 +57,8 @@ Namespace Jobs
|
||||
Dim oGdPictureKey As String = pContext.MergedJobDataMap.Item(Constants.GDPICTURE)
|
||||
LogConfig = pContext.MergedJobDataMap.Item(Constants.LOGCONFIG)
|
||||
Logger = LogConfig.GetLogger()
|
||||
|
||||
myTempFiles = New TempFiles(LogConfig)
|
||||
myTempFiles.Create()
|
||||
Dim JobId = pContext.JobDetail.Key
|
||||
Logger.Info("Starting job {0}", JobId)
|
||||
|
||||
@@ -410,14 +412,18 @@ Namespace Jobs
|
||||
Else
|
||||
Logger.Info($"we got bytes..")
|
||||
oInputPath = Config.DocumentPathOrigin
|
||||
Dim oTempFolder = TempFiles.TempPath
|
||||
Logger.Info($"oInputPath: {Config.DocumentPathOrigin}")
|
||||
End If
|
||||
|
||||
|
||||
If IsNothing(pEnvelopeData.DocAsByte) Then
|
||||
Dim oDirectorySource As String = Path.GetDirectoryName(oInputPath)
|
||||
Dim split As String() = oDirectorySource.Split("\")
|
||||
ParentFolderUID = split(split.Length - 1)
|
||||
Else
|
||||
ParentFolderUID = pEnvelopeData.EnvelopeId
|
||||
End If
|
||||
|
||||
Dim oDirectorySource As String = Path.GetDirectoryName(oInputPath)
|
||||
Dim split As String() = oDirectorySource.Split("\")
|
||||
ParentFolderUID = split(split.Length - 1)
|
||||
|
||||
Logger.Info("ParentFolderUID: [{0}]", ParentFolderUID)
|
||||
Dim oInputDocumentBuffer As Byte()
|
||||
|
||||
@@ -41,8 +41,6 @@ Namespace Jobs.FinalizeDocument
|
||||
Throw New BurnAnnotationException($"Adding Annotation failed")
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
oResult = Manager.BurnAnnotationsToPage(RemoveInitialAnnots:=True, VectorMode:=True)
|
||||
If oResult <> GdPictureStatus.OK Then
|
||||
Throw New BurnAnnotationException($"Could not burn annotations to file: [{oResult}]")
|
||||
@@ -71,6 +69,7 @@ Namespace Jobs.FinalizeDocument
|
||||
Dim oAnnotationData = JsonConvert.DeserializeObject(Of AnnotationData)(pInstantJSON)
|
||||
|
||||
For Each oAnnotation In oAnnotationData.annotations
|
||||
Logger.Debug("Adding AnnotationID: " + oAnnotation.id)
|
||||
Select Case oAnnotation.type
|
||||
Case ANNOTATION_TYPE_IMAGE
|
||||
AddImageAnnotation(oAnnotation, oAnnotationData.attachments)
|
||||
|
||||
Reference in New Issue
Block a user