IDB Conform Step1
This commit is contained in:
@@ -3,7 +3,7 @@ Imports PdfSharp.Pdf.Annotations
|
||||
Imports PdfSharp.Pdf.IO
|
||||
Imports PdfSharp.Drawing
|
||||
Public Class ClassAnnotation
|
||||
Public Shared Function Annotate_PDF(title As String, content As String, page As Integer, Optional ycorrect As Integer = 0, Optional sizecorrect As Integer = 0)
|
||||
Public Shared Function Annotate_PDF(title As String, content As String, page As Integer, fromGui As Boolean, Optional ycorrect As Integer = 0, Optional sizecorrect As Integer = 0)
|
||||
Try
|
||||
Dim doc As PdfDocument = PdfReader.Open(CURRENT_DOC_PATH, PdfDocumentOpenMode.Modify)
|
||||
Dim firstPage As PdfPage = doc.Pages(page)
|
||||
@@ -23,6 +23,9 @@ Public Class ClassAnnotation
|
||||
doc.Save(CURRENT_DOC_PATH)
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
If fromGui = True Then
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error in Annotate pdf:")
|
||||
End If
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info("Unexpected error in Annotate pdf: " & ex.Message, False)
|
||||
Return False
|
||||
|
||||
Reference in New Issue
Block a user