We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

RedactionAnnotation is shifted for rotated page

Redaction annotations are added to the page as it haven’t been rotated.

public void addRedactionAnnotation(Page page, Rectangle rectangle, String overlayText, String colorHex) {

		var annotation = new RedactionAnnotation(page, rectangle);
		var color = hexToColor(colorHex);

		annotation.setFillColor(color);
		annotation.setColor(Color.getBlack());
		annotation.setModified(new Date());
		annotation.setOverlayText(overlayText);
		annotation.setTextAlignment(HorizontalAlignment.Left);
		annotation.setRepeat(false);
		annotation.redact();

		page.getAnnotations().add(annotation);
	}

Original document: CAT-354-0401 Clinical Trial Report.pdf (618.6 KB)
Processed document: Redacted CAT-354-0401 Clinical Trial Report.pdf (644.0 KB)

When trying to use page.getAnnotations().add(annotation, true), then annotations are added twice. Once as before and once in correct place, but with overlay text rotated as before.

Redacted twice example: redacted_twice.jpg (86.6 KB)

@valerijaslu

To ensure a timely and accurate response, please create a simple Java application (source code without compilation errors) that helps us to reproduce your problem on our end and attach it here for testing. We will investigate the issue and provide you more information on it.