Hello,
It seems, that Pdfium if unable to finish GenerateContent() function if I try add text object to PDF file I attached.
My code snippet is below.
Please let me know if you are able to fix this issue.
Mikhael

landscape_orientation.PDF
(548kb) downloaded 0 time(s).
Dim srcPDF = "D:\In\landscape_orientation.PDF"
Dim dstPDF = "D:\out\123.pdf"
Dim sLabelText = "My test watermark"
Using pdfFile = PdfDocument.Load(srcPDF, New PdfForms())
For Each pdfiumPage In pdfFile.Pages
Dim font = PdfFont.CreateStock(pdfiumPage.Document, FontStockNames.Arial)
Dim fillColor = New FS_COLOR(128, 255, 0, 0)
Dim wmTextObject As PdfTextObject = PdfTextObject.Create(sLabelText, pdfiumPage.Width / 2, pdfiumPage.Height / 2, font, 20)
wmTextObject.FillColor = fillColor
pdfiumPage.PageObjects.Add(wmTextObject)
pdfiumPage.GenerateContent()
Next
pdfFile.Save(dstPDF, SaveFlags.NoIncremental)
End Using