Redaction: text is shifted to the left

Hi, I’ve run into a problem that when I edit redact, sometimes the text that comes right behind them can shift to the left, where the redact was made.
ShiftedTextAfterRedaction.pdf (14.0 KB)
I’ve attached a file with which the problem can be reproduced with the following code:

	@Test
void shiftedTextAfterRedaction() throws IOException {
	var pdfInputStream = new ClassPathResource("pdf/ShiftedTextAfterRedaction.pdf").getInputStream();
	Document document = new Document(pdfInputStream);
	Annotation annotation = document.getPages().get_Item(1).getAnnotations().get_Item(2);
	if (annotation instanceof RedactionAnnotation) {
		com.aspose.pdf.Redaction.redactText(annotation.getPage(), annotation.getRect());
		annotation.flatten();
	}
	document.save("result.pdf");
}

image.png (11.6 KB)

After applying the redact. Some of the text after it is shifted to the left.

I found a similar problem, not sure if the cause is the same. Is there any workaround for this or what could be causing the problem?

@ebiruk

We were able to reproduce the issue in our environment while testing the case with 22.9 version of the API. Therefore, it has been logged as PDFJAVA-42178 in our issue tracking system. We will further look into its details and keep you posted with the status of its correction. Please be patient and spare us some time.

We are sorry for the inconvenience.