Fiskalkunden-Fertigstellung
This commit is contained in:
@@ -1300,7 +1300,6 @@ Public Class cFormularManager
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Public Shared Sub PrintViaGS(PDFFile As String, printerName As String)
|
||||
Try
|
||||
Dim assembly = System.Reflection.Assembly.GetExecutingAssembly()
|
||||
@@ -1938,6 +1937,31 @@ Public Class DATENVERVER_OPTIONS
|
||||
End Function
|
||||
|
||||
|
||||
Public Shared Function getPDFViaSpirePDF_FromFile(File As String, Optional targetPath As String = "") As String
|
||||
Try
|
||||
If targetPath = "" Then targetPath = TMP_PATH
|
||||
|
||||
VERAG_PROG_ALLGEMEIN.cProgramFunctions.spireLoadLicense()
|
||||
Dim doc As New Spire.Pdf.PdfDocument '= New Spire.Pdf.PdfDocument(URL)
|
||||
doc.LoadFromHTML(File, False, False, False)
|
||||
'doc.LoadFromFile(File)
|
||||
If doc IsNot Nothing Then
|
||||
doc.PageSettings.Size = Spire.Pdf.PdfPageSize.A4
|
||||
doc.PrintDocument.DefaultPageSettings.Landscape = True
|
||||
doc.PageScaling = Spire.Pdf.PdfPrintPageScaling.FitSize
|
||||
' doc.PrinterName = printerName
|
||||
' doc.PrintDocument.Print()
|
||||
doc.SaveToFile(targetPath)
|
||||
End If
|
||||
|
||||
Return targetPath
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message & ex.StackTrace)
|
||||
End Try
|
||||
Return ""
|
||||
End Function
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
Public Class barcodeToPdf
|
||||
|
||||
Reference in New Issue
Block a user