This commit is contained in:
2025-07-20 21:16:01 +02:00
parent f206b96009
commit d079aff6cc
18 changed files with 415 additions and 98 deletions

View File

@@ -1396,6 +1396,19 @@ Public Class cFormularManager
Dim doc As New Spire.Pdf.PdfDocument(pdfPath)
'Versuche, die Seitengröße zu überprüfen
'-----------------------------------------
If doc.Pages.Count = 0 Then
' Leeres Dokument, überspringen
Continue For
End If
Dim pageSize = doc.Pages(0).Size
If pageSize.Width <= 0 OrElse pageSize.Height <= 0 Then
' Ungültige Seitengröße, überspringen
Continue For
End If
'-----------------------------------------
doc.PageSettings.Size = Spire.Pdf.PdfPageSize.A4
doc.PageSettings.Orientation = Spire.Pdf.PdfPageOrientation.Landscape