Hi,
The following code with the attached single page PDF fails if the Lower Left Y is anything less than 16 but it works with 16:
var pageDoc = new Aspose.Pdf.Document(@"C:\temp\redaction\887649.pdf");
pageDoc.PageInfo.Margin.Bottom = 20;
pageDoc.PageInfo.Margin.Top = 0;
pageDoc.PageInfo.Margin.Left = 0;
pageDoc.PageInfo.Margin.Right = 0;
pageDoc.PageInfo.Height = pageDoc.Pages[1].TrimBox.Height;
pageDoc.PageInfo.Width = pageDoc.Pages[1].TrimBox.Width;
// Change lly from 16 to 15 and the redaction fails with "Index was outside the bounds of the array" exception
Rectangle redactionArea = new Rectangle(543,15,611,33);
var redaction = new RedactionAnnotation(pageDoc.Pages[1], redactionArea);
redaction.FillColor = Color.White;
redaction.BorderColor = Color.White;
redaction.Color = Color.White;
pageDoc.Pages[1].Annotations.Add(redaction);
// This line will fail if lly is 15 or less
redaction.Redact();
pageDoc.Save(@"C:\temp\redaction\887649_redacted.pdf");
I have a similar example on a landscape page but that works when the redaction is in the bottom right corner so very confusing!
Using 19.7 of Aspose.PDF but also just tested with 19.8, same issue
887649.pdf (79.2 KB)