Watermark positioning problem, it does not appear in the expected position

We use aspose.pdf (Version 23.2.0, .Net 4.8) to insert watermark on each page in the upper right corner of the PDF document with the following code.
However, this does not work for all documents. The watermark appears outside the document (visible area) and is only with Adobe Acrobat Pro visible.

var watermark = $“Seite {from} von {to}”;
WatermarkArtifact artifact = new WatermarkArtifact();
artifact.SetTextAndState(
watermark,
new TextState()
{
FontSize = 12,
ForegroundColor = Color.Blue,
Font = FontRepository.FindFont(“Arial”)
});
artifact.ArtifactVerticalAlignment = VerticalAlignment.Top;
artifact.ArtifactHorizontalAlignment = HorizontalAlignment.Right;
artifact.RightMargin = 20;
artifact.Opacity = 1;
artifact.IsBackground = false;

20230312_watermark.PNG (12.1 KB)

@mathias.dittrich86875

Would you please attach the sample PDF document for which this code is not working? Also, please try to use TextStamp in order to add text watermark and see if it resolves your issue.

This document has been scanned and saved as a pdf.

example.pdf (225.6 KB)

@mathias.dittrich86875

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PDFNET-53960

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

The issues you have found earlier (filed as PDFNET-53960) have been fixed in Aspose.PDF for .NET 24.3.