First version of service
This commit is contained in:
@@ -27,8 +27,11 @@ Namespace Jobs
|
||||
End Sub
|
||||
|
||||
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)
|
||||
Dim oResult As GdPictureStatus
|
||||
|
||||
oResult = Manager.InitFromFile(pSourceFilePath)
|
||||
If oResult <> GdPictureStatus.OK Then
|
||||
Logger.Warn("Could not open file [{0}] for burning: [{1}]", pSourceFilePath, oResult.ToString)
|
||||
Return False
|
||||
End If
|
||||
|
||||
@@ -41,10 +44,21 @@ Namespace Jobs
|
||||
|
||||
Dim oFileInfo As New FileInfo(pSourceFilePath)
|
||||
Dim oDestinationFilePath As String = Path.Combine(pDestinationDirectoryPath, oFileInfo.Name)
|
||||
Try
|
||||
Logger.Debug("Export filepath: [{0}]", oDestinationFilePath)
|
||||
|
||||
Try
|
||||
oResult = Manager.BurnAnnotationsToPage(RemoveInitialAnnots:=True, VectorMode:=True)
|
||||
If oResult <> GdPictureStatus.OK Then
|
||||
Logger.Warn("Could not burn annotations to file file [{0}]: [{1}]", pSourceFilePath, oResult.ToString)
|
||||
Return False
|
||||
End If
|
||||
|
||||
oResult = Manager.SaveDocumentToPDF(oDestinationFilePath)
|
||||
If oResult <> GdPictureStatus.OK Then
|
||||
Logger.Warn("Could not save file [{0}] to path [{1}]: [{2}]", oFileInfo.Name, oDestinationFilePath, oResult.ToString)
|
||||
Return False
|
||||
End If
|
||||
|
||||
Manager.BurnAnnotationsToPage(RemoveInitialAnnots:=True, VectorMode:=True)
|
||||
Manager.SaveDocumentToPDF(oDestinationFilePath)
|
||||
Manager.Close()
|
||||
|
||||
Return True
|
||||
|
||||
Reference in New Issue
Block a user