job
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
Imports System.Drawing
|
||||
Imports DevExpress.Pdf
|
||||
Imports System.IO
|
||||
Imports DigitalData.Modules.Base
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports GdPicture14
|
||||
@@ -26,9 +26,9 @@ Namespace Jobs
|
||||
Manager = New AnnotationManager()
|
||||
End Sub
|
||||
|
||||
Public Function BurnInstantJSONAnnotationsToPDF(pSourcePath As String, pInstantJSONList As List(Of String), pDestinationPath As String) As Boolean
|
||||
If Manager.InitFromFile(pSourcePath) <> GdPictureStatus.OK Then
|
||||
Logger.Warn("Could not open file [{0}] for burning.", pSourcePath)
|
||||
Public Function BurnInstantJSONAnnotationsToPDF(pSourceFilePath As String, pInstantJSONList As List(Of String), pDestinationDirectoryPath As String) As Boolean
|
||||
If Manager.InitFromFile(pSourceFilePath) <> GdPictureStatus.OK Then
|
||||
Logger.Warn("Could not open file [{0}] for burning.", pSourceFilePath)
|
||||
Return False
|
||||
End If
|
||||
|
||||
@@ -39,14 +39,17 @@ Namespace Jobs
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim oFileInfo As New FileInfo(pSourceFilePath)
|
||||
Dim oDestinationFilePath As String = Path.Combine(pDestinationDirectoryPath, oFileInfo.Name)
|
||||
Try
|
||||
|
||||
Manager.BurnAnnotationsToPage(RemoveInitialAnnots:=True, VectorMode:=True)
|
||||
Manager.SaveDocumentToPDF(pDestinationPath)
|
||||
Manager.SaveDocumentToPDF(oDestinationFilePath)
|
||||
Manager.Close()
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
Logger.Warn("Could not burn and save annotations to file [{0}]!", pDestinationPath)
|
||||
Logger.Warn("Could not burn and save annotations to file [{0}]!", oDestinationFilePath)
|
||||
Logger.Error(ex)
|
||||
|
||||
Return False
|
||||
|
||||
Reference in New Issue
Block a user