Text overlay is rendered outside redaction area

Hello, I need some clarification on redaction behaviour. Is this expected, or is it a bug? I compared with other tools on the market, and they truncate the overlay text if it gets outside the redaction area.

using var document = PdfDocument.Load("SourceFilePath");
var redaction = page.Annotations.AddRedaction(0, 0, 1, 1);
redaction.Quads.Add(new PdfQuad(537.84, 257.03999999999996, 572.4, 271.44));

redaction.Appearance.RedactedAreaFillColor = PdfColor.FromRgb(0,0,0);

redaction.Appearance.FontColor = PdfColor.FromRgb(1,0,0);
redaction.Appearance.FontFace = new PdfFontFace("Times New Roman");
redaction.Appearance.FontSize = 8;
redaction.Appearance.OverlayText = "Redacted 3 Right Alignment";
redaction.Appearance.TextAlignment = PdfTextAlignment.Right;

redaction.Apply();

document.Save("DestinationFilePath");

Hi Oleksandr,

Can you send us the “SourceFilePath” file so we can investigate this?

Regards,
Mario

Please try again with this NuGet package:

Install-Package GemBox.Pdf -Version 2025.7.106

Note that this is a hidden (unlisted) version. To install it, you’ll need to run the above command on the NuGet Package Manager Console (Tools → NuGet Package Manager → Package Manager Console).

Does this solve your issue?

Regards,
Mario

Mario, the issue is fixed. Thank you!