fiskaluebersicht, etc.
This commit is contained in:
@@ -482,7 +482,7 @@ Public Class cSMS
|
||||
If Originator.Length > 11 Then Originator = Originator.Substring(0, 11)
|
||||
|
||||
If Message.Contains(vbLf) Then
|
||||
Message = Message.Replace(vbLf, " ")
|
||||
Message = Message.Replace(vbLf, ", ")
|
||||
End If
|
||||
|
||||
Dim json As New Chilkat.JsonObject
|
||||
|
||||
@@ -1274,6 +1274,48 @@ Public Class cFormularManager
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Shared Function convertPictureToPDF(path As String) As String
|
||||
|
||||
If Not File.Exists(path) Then
|
||||
Throw New FileNotFoundException("Picture not found.", path)
|
||||
End If
|
||||
|
||||
Dim outputPath As String = getTMPPath_PDF()
|
||||
|
||||
Dim pdfImage As Spire.Pdf.Graphics.PdfImage = pdfImage.FromFile(path)
|
||||
|
||||
Dim doc As New Spire.Pdf.PdfDocument()
|
||||
|
||||
Try
|
||||
Dim page As PdfPageBase = doc.Pages.Add()
|
||||
|
||||
Dim pageWidth As Single = page.ActualSize.Width
|
||||
Dim pageHeight As Single = page.ActualSize.Height
|
||||
|
||||
'Seitenverhältnis beibehalten
|
||||
Dim scaleX As Single = pageWidth / pdfImage.Width
|
||||
Dim scaleY As Single = pageHeight / pdfImage.Height
|
||||
Dim scale As Single = Math.Min(scaleX, scaleY)
|
||||
|
||||
Dim imageWidth As Single = pdfImage.Width * scale
|
||||
Dim imageHeight As Single = pdfImage.Height * scale
|
||||
|
||||
'Bild zentrieren
|
||||
Dim x As Single = (pageWidth - imageWidth) / 2
|
||||
Dim y As Single = (pageHeight - imageHeight) / 2
|
||||
|
||||
page.Canvas.DrawImage(pdfImage, 0, 0)
|
||||
|
||||
doc.SaveToFile(outputPath)
|
||||
|
||||
Finally
|
||||
doc.Close()
|
||||
End Try
|
||||
|
||||
|
||||
Return outputPath
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1535,6 +1577,7 @@ Public Class cFormularManager
|
||||
|
||||
|
||||
|
||||
|
||||
Public Shared Function getPDFViaSpirePDF_FromURL(URL As String, Optional targetPath As String = "") As String
|
||||
Try
|
||||
If targetPath = "" Then targetPath = getTMPPath_PDF()
|
||||
@@ -2614,7 +2657,7 @@ Public Class DATENVERVER_OPTIONS
|
||||
xmp.SetStructField(pdfaExt, "schemas[1]", pdfaSchema, "namespaceURI", fxNs)
|
||||
xmp.SetStructField(pdfaExt, "schemas[1]", pdfaSchema, "prefix", "fx")
|
||||
|
||||
' 🔥 property MUSS rdf:Seq sein!
|
||||
' property MUSS rdf:Seq sein!
|
||||
xmp.SetStructField(
|
||||
pdfaExt,
|
||||
"schemas[1]",
|
||||
@@ -2632,7 +2675,7 @@ Public Class DATENVERVER_OPTIONS
|
||||
|
||||
Dim arrayPath = "schemas[1]/pdfaSchema:property"
|
||||
|
||||
' 🔥 Item in rdf:Seq hinzufügen
|
||||
' Item in rdf:Seq hinzufügen
|
||||
xmp.AppendArrayItem(
|
||||
pdfaExt,
|
||||
arrayPath,
|
||||
|
||||
Reference in New Issue
Block a user