IDB Conform Step1

This commit is contained in:
2019-11-14 09:59:31 +01:00
parent d8e7f94480
commit 9e20642257
34 changed files with 2836 additions and 4570 deletions

View File

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