Datenserver Druckertest aus Performancegründen deaktiviert.
This commit is contained in:
@@ -259,6 +259,8 @@ Public Class cDATENSERVER
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Shared Function replaceInvalidCahr(ByRef s As String) As String
|
Public Shared Function replaceInvalidCahr(ByRef s As String) As String
|
||||||
|
Try
|
||||||
|
|
||||||
|
|
||||||
s = s.Replace("İ", "I")
|
s = s.Replace("İ", "I")
|
||||||
s = s.Replace("İ", "I")
|
s = s.Replace("İ", "I")
|
||||||
@@ -291,6 +293,10 @@ Public Class cDATENSERVER
|
|||||||
s = s.Replace("?", "")
|
s = s.Replace("?", "")
|
||||||
|
|
||||||
Return s
|
Return s
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||||
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function uploadDataToDATENSERVER(srcPath, Optional bezeichnung = "", Optional endung = "", Optional allowMsg = True, Optional coll_archiv = False, Optional delteFromFileSystem = True, Optional enableOverwritting = False) As Boolean
|
Public Function uploadDataToDATENSERVER(srcPath, Optional bezeichnung = "", Optional endung = "", Optional allowMsg = True, Optional coll_archiv = False, Optional delteFromFileSystem = True, Optional enableOverwritting = False) As Boolean
|
||||||
@@ -479,7 +485,7 @@ Public Class cDATENSERVER
|
|||||||
End Using
|
End Using
|
||||||
Return False
|
Return False
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message)
|
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||||
End Try
|
End Try
|
||||||
Return da_id
|
Return da_id
|
||||||
End Function
|
End Function
|
||||||
@@ -578,7 +584,7 @@ Public Class cDATENSERVER
|
|||||||
'SQL.doSQL("DELETE FROM [tblDatenarchiv_Collection] WHERE [coll_daId]=" & id & " ", "FMZOLL")
|
'SQL.doSQL("DELETE FROM [tblDatenarchiv_Collection] WHERE [coll_daId]=" & id & " ", "FMZOLL")
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgBox(ex.Message & ex.StackTrace)
|
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||||
Return False
|
Return False
|
||||||
End Try
|
End Try
|
||||||
Return True
|
Return True
|
||||||
@@ -1059,7 +1065,7 @@ Public Class cFormularManager
|
|||||||
image.SetAbsolutePosition(bc.x, pagesize.Top - bc.y)
|
image.SetAbsolutePosition(bc.x, pagesize.Top - bc.y)
|
||||||
over.AddImage(image)
|
over.AddImage(image)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgBox(ex.Message & ex.StackTrace)
|
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||||
End Try
|
End Try
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
@@ -1079,7 +1085,7 @@ Public Class cFormularManager
|
|||||||
pdf.Close()
|
pdf.Close()
|
||||||
Return destPath
|
Return destPath
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgBox(ex.Message & ex.StackTrace)
|
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||||
Return ""
|
Return ""
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
@@ -1248,8 +1254,99 @@ Public Class cFormularManager
|
|||||||
|
|
||||||
|
|
||||||
Public Shared Sub PrintViaSpirePDF(PDFFile As String(), Optional printerName As String = "")
|
Public Shared Sub PrintViaSpirePDF(PDFFile As String(), Optional printerName As String = "")
|
||||||
|
|
||||||
|
'---------------------WEGEN PERFORMANCE-PROBLEMEN DEAKTIVIERT!
|
||||||
|
'Try
|
||||||
|
' Dim printerPaperSizeA4 As Boolean = False
|
||||||
|
' If printerName = "" Then
|
||||||
|
' Dim sPrinters As ArrayList
|
||||||
|
|
||||||
|
' If VERAG_PROG_ALLGEMEIN.cAllgemein.PRINTER_LIST IsNot Nothing Then
|
||||||
|
' sPrinters = VERAG_PROG_ALLGEMEIN.cAllgemein.PRINTER_LIST
|
||||||
|
' Else
|
||||||
|
' sPrinters = New ArrayList
|
||||||
|
' For Each sPrinter As String In System.Drawing.Printing.PrinterSettings.InstalledPrinters
|
||||||
|
' sPrinters.Add(sPrinter)
|
||||||
|
' Next
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' If VERAG_PROG_ALLGEMEIN.cAllgemein.PRINTER_STANDARD <> String.Empty Then
|
||||||
|
|
||||||
|
' For Each printer In sPrinters
|
||||||
|
|
||||||
|
' If printer.ToString.ToLower.Contains(VERAG_PROG_ALLGEMEIN.cAllgemein.PRINTER_STANDARD.ToLower) Then
|
||||||
|
' printerName = printer
|
||||||
|
' For Each installedPrinter In System.Drawing.Printing.PrinterSettings.InstalledPrinters
|
||||||
|
' If printerName = installedPrinter.ToString Then
|
||||||
|
' Dim currentInstalledPrinter As New System.Drawing.Printing.PrinterSettings
|
||||||
|
' currentInstalledPrinter.PrinterName = printerName
|
||||||
|
' For Each sizes In currentInstalledPrinter.PaperSizes
|
||||||
|
' If sizes.PaperName = "A4" Then
|
||||||
|
' printerPaperSizeA4 = True
|
||||||
|
' Exit For
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' Next
|
||||||
|
' Exit For
|
||||||
|
' End If
|
||||||
|
' Next
|
||||||
|
' Exit For
|
||||||
|
' End If
|
||||||
|
' Next
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' If printerName = "" Then
|
||||||
|
' Dim oPS As New System.Drawing.Printing.PrinterSettings
|
||||||
|
' printerName = oPS.PrinterName
|
||||||
|
' For Each sizes In oPS.PaperSizes
|
||||||
|
' If sizes.PaperName = "A4" Then printerPaperSizeA4 = True
|
||||||
|
' Exit For
|
||||||
|
' Next
|
||||||
|
' Else
|
||||||
|
' If Not printerPaperSizeA4 Then
|
||||||
|
' Dim currentInstalledPrinter As New System.Drawing.Printing.PrinterSettings
|
||||||
|
' currentInstalledPrinter.PrinterName = printerName
|
||||||
|
' For Each sizes In currentInstalledPrinter.PaperSizes
|
||||||
|
' If sizes.PaperName = "A4" Then printerPaperSizeA4 = True
|
||||||
|
' Exit For
|
||||||
|
' Next
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' If printerName = "" Then
|
||||||
|
' MsgBox("Drucker konnte nicht ermittelt werden!")
|
||||||
|
' Exit Sub
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' If Not printerPaperSizeA4 Then
|
||||||
|
' MsgBox("Der ermittelte Drucker " & printerName & " unterstützt keinen A4 Ausdrucke!" & vbNewLine & "Vorang wird abgebrochen!")
|
||||||
|
' Exit Sub
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' VERAG_PROG_ALLGEMEIN.cProgramFunctions.spireLoadLicense()
|
||||||
|
' For Each pdfPath In PDFFile
|
||||||
|
' Dim doc As New Spire.Pdf.PdfDocument(pdfPath)
|
||||||
|
|
||||||
|
' doc.PageSettings.Size = Spire.Pdf.PdfPageSize.A4
|
||||||
|
|
||||||
|
' doc.PageSettings.Orientation = Spire.Pdf.PdfPageOrientation.Landscape
|
||||||
|
' doc.PrintSettings.SelectSinglePageLayout(PdfSinglePageScalingMode.FitSize, True)
|
||||||
|
' doc.PrintSettings.PrinterName = printerName
|
||||||
|
|
||||||
|
' If doc.PrintSettings.IsValid Then
|
||||||
|
' doc.Print()
|
||||||
|
' Else
|
||||||
|
' MsgBox("Druckereinstellungen ungültig!")
|
||||||
|
' Exit Sub
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' Next
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Try
|
Try
|
||||||
Dim printerPaperSizeA4 As Boolean = False
|
|
||||||
If printerName = "" Then
|
If printerName = "" Then
|
||||||
Dim sPrinters As ArrayList
|
Dim sPrinters As ArrayList
|
||||||
|
|
||||||
@@ -1264,59 +1361,23 @@ Public Class cFormularManager
|
|||||||
|
|
||||||
If VERAG_PROG_ALLGEMEIN.cAllgemein.PRINTER_STANDARD <> String.Empty Then
|
If VERAG_PROG_ALLGEMEIN.cAllgemein.PRINTER_STANDARD <> String.Empty Then
|
||||||
|
|
||||||
For Each printer In sPrinters
|
For i As Integer = 0 To sPrinters.Count - 1
|
||||||
|
If i.ToString.ToLower.Contains(VERAG_PROG_ALLGEMEIN.cAllgemein.PRINTER_STANDARD.ToLower) Then
|
||||||
If printer.ToString.ToLower.Contains(VERAG_PROG_ALLGEMEIN.cAllgemein.PRINTER_STANDARD.ToLower) Then
|
printerName = i
|
||||||
printerName = printer
|
|
||||||
For Each installedPrinter In System.Drawing.Printing.PrinterSettings.InstalledPrinters
|
|
||||||
If printerName = installedPrinter.ToString Then
|
|
||||||
Dim currentInstalledPrinter As New System.Drawing.Printing.PrinterSettings
|
|
||||||
currentInstalledPrinter.PrinterName = printerName
|
|
||||||
For Each sizes In currentInstalledPrinter.PaperSizes
|
|
||||||
If sizes.PaperName = "A4" Then printerPaperSizeA4 = True
|
|
||||||
Exit For
|
|
||||||
Next
|
|
||||||
Exit For
|
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If printerName = "" Then
|
If printerName = "" Then
|
||||||
Dim oPS As New System.Drawing.Printing.PrinterSettings
|
Dim oPS As New System.Drawing.Printing.PrinterSettings
|
||||||
printerName = oPS.PrinterName
|
printerName = oPS.PrinterName
|
||||||
For Each sizes In oPS.PaperSizes
|
|
||||||
If sizes.PaperName = "A4" Then printerPaperSizeA4 = True
|
|
||||||
Exit For
|
|
||||||
Next
|
|
||||||
Else
|
|
||||||
If Not printerPaperSizeA4 Then
|
|
||||||
Dim currentInstalledPrinter As New System.Drawing.Printing.PrinterSettings
|
|
||||||
currentInstalledPrinter.PrinterName = printerName
|
|
||||||
For Each sizes In currentInstalledPrinter.PaperSizes
|
|
||||||
If sizes.PaperName = "A4" Then printerPaperSizeA4 = True
|
|
||||||
Exit For
|
|
||||||
Next
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
'Dim docs As Spire.Pdf.PdfDocument() = {New Spire.Pdf.PdfDocument("C:\Users\DEVELOPER1\Desktop\Agrotel.pdf")}
|
|
||||||
|
|
||||||
If printerName = "" Then
|
If printerName = "" Then
|
||||||
MsgBox("Drucker konnte nicht ermittelt werden!")
|
MsgBox("Drucker konnte nicht ermittelt werden!")
|
||||||
Exit Sub
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not printerPaperSizeA4 Then
|
|
||||||
MsgBox("Der ermittelte Drucker " & printerName & " unterstützt keinen A4 Ausdrucke!" & vbNewLine & "Vorang wird abgebrochen!")
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
|
|
||||||
VERAG_PROG_ALLGEMEIN.cProgramFunctions.spireLoadLicense()
|
VERAG_PROG_ALLGEMEIN.cProgramFunctions.spireLoadLicense()
|
||||||
For Each pdfPath In PDFFile
|
For Each pdfPath In PDFFile
|
||||||
Dim doc As New Spire.Pdf.PdfDocument(pdfPath)
|
Dim doc As New Spire.Pdf.PdfDocument(pdfPath)
|
||||||
@@ -1326,42 +1387,13 @@ Public Class cFormularManager
|
|||||||
doc.PageSettings.Orientation = Spire.Pdf.PdfPageOrientation.Landscape
|
doc.PageSettings.Orientation = Spire.Pdf.PdfPageOrientation.Landscape
|
||||||
doc.PrintSettings.SelectSinglePageLayout(PdfSinglePageScalingMode.FitSize, True)
|
doc.PrintSettings.SelectSinglePageLayout(PdfSinglePageScalingMode.FitSize, True)
|
||||||
doc.PrintSettings.PrinterName = printerName
|
doc.PrintSettings.PrinterName = printerName
|
||||||
|
|
||||||
If doc.PrintSettings.IsValid Then
|
|
||||||
doc.Print()
|
doc.Print()
|
||||||
Else
|
|
||||||
MsgBox("Druckereinstellungen ungültig!")
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'doc.PrintDocument.DefaultPageSettings.Landscape = True
|
|
||||||
'doc.PageScaling = Spire.Pdf.PdfPrintPageScaling.FitSize
|
|
||||||
|
|
||||||
'doc.PrinterName = printerName
|
|
||||||
'doc.PrintDocument.Print()
|
|
||||||
|
|
||||||
|
|
||||||
'Dim doc As New Spire.Pdf.PdfDocument
|
|
||||||
'doc.LoadFromFile(pdfPath)
|
|
||||||
'doc.Pages(0).TryCompressImage(0)
|
|
||||||
''signature.SetSignNameWidth(float width);
|
|
||||||
'doc.SaveToFile("C:\Users\DEVELOPER1\Desktop\TEST.pdf", 0, 0, Spire.Pdf.FileFormat.PDF)
|
|
||||||
|
|
||||||
|
|
||||||
'Dim doc2 As New Spire.Pdf.PdfDocument("C:\Users\DEVELOPER1\Desktop\TEST.pdf")
|
|
||||||
'doc2.PageSettings.Size = Spire.Pdf.PdfPageSize.A4
|
|
||||||
'doc2.PrintDocument.DefaultPageSettings.Landscape = True
|
|
||||||
'doc2.PageScaling = Spire.Pdf.PdfPrintPageScaling.FitSize
|
|
||||||
|
|
||||||
'doc2.PrinterName = printerName
|
|
||||||
'doc2.PrintDocument.Print()
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgBox(ex.Message & ex.StackTrace)
|
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -1408,7 +1440,7 @@ Public Class cFormularManager
|
|||||||
|
|
||||||
Next
|
Next
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgBox(ex.Message & ex.StackTrace)
|
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -1451,7 +1483,7 @@ Public Class cFormularManager
|
|||||||
Next
|
Next
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgBox(ex.Message & ex.StackTrace)
|
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -1491,7 +1523,7 @@ Public Class cFormularManager
|
|||||||
|
|
||||||
Return targetPath
|
Return targetPath
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgBox(ex.Message & ex.StackTrace)
|
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||||
End Try
|
End Try
|
||||||
Return ""
|
Return ""
|
||||||
End Function
|
End Function
|
||||||
@@ -1588,7 +1620,7 @@ Public Class cFormularManager
|
|||||||
'End Using
|
'End Using
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgBox(ex.Message & ex.StackTrace)
|
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -2004,7 +2036,7 @@ Public Class DATENVERVER_OPTIONS
|
|||||||
IO.File.Copy(pfad, tmpPath)
|
IO.File.Copy(pfad, tmpPath)
|
||||||
Return tmpPath
|
Return tmpPath
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgBox(ex.Message & ex.StackTrace)
|
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||||
End Try
|
End Try
|
||||||
Return pfad
|
Return pfad
|
||||||
End Function
|
End Function
|
||||||
@@ -2016,7 +2048,7 @@ Public Class DATENVERVER_OPTIONS
|
|||||||
IO.File.Copy(pfad, tmpPath)
|
IO.File.Copy(pfad, tmpPath)
|
||||||
Return tmpPath
|
Return tmpPath
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgBox(ex.Message & ex.StackTrace)
|
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||||
End Try
|
End Try
|
||||||
Return pfad
|
Return pfad
|
||||||
End Function
|
End Function
|
||||||
@@ -2219,7 +2251,7 @@ Public Class DATENVERVER_OPTIONS
|
|||||||
|
|
||||||
Return targetPath
|
Return targetPath
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgBox(ex.Message & ex.StackTrace)
|
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||||
End Try
|
End Try
|
||||||
Return ""
|
Return ""
|
||||||
End Function
|
End Function
|
||||||
|
|||||||
Reference in New Issue
Block a user