Some (many) text is missing.
HINT: Only in Version 8.11.10 (after Downgrade to 8.11.2) it works.
- Code: Select all
Public Function DruckPDF(datei As String, drucker As Printing.PrinterSettings, druckerSeite As Printing.PageSettings, größe As SizeF) As Boolean
Dim pdoc As New Spire.Pdf.PdfDocument
Try
pdoc.PrintSettings.PrintController = New Printing.StandardPrintController()
pdoc.LoadFromFile(datei)
pdoc.PageSettings.Size = größe
pdoc.PrintSettings.SetPaperMargins(0, 0, 0, 0)
If Settings.DruckSkalierung Then
pdoc.PrintSettings.SelectSinglePageLayout(Spire.Pdf.Print.PdfSinglePageScalingMode.FitSize, True)
Else
pdoc.PrintSettings.SelectSinglePageLayout(Spire.Pdf.Print.PdfSinglePageScalingMode.ActualSize, True)
End If
pdoc.PrintSettings.PrinterName = drucker.PrinterName
pdoc.PrintSettings.Duplex = drucker.Duplex
pdoc.PrintSettings.Color = druckerSeite.Color
pdoc.Print()
Return True
Catch ex As Exception
MsgBox($"Fehler {ex.Message} beim Ausdruck")
pdoc.Close()
End Try
pdoc.Close()
Return False
End Function