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

Free Support Forum - aspose.com

Font size of overlay text is not changing using RedactionAnnotation::setFontSize(...)

RedactionAnnotation::setFontSize(…) is not working for overlay text.

	public void addRedactionAnnotation(Page page, Rectangle rectangle, String overlayText, String colorHex) {
		var annotation = new RedactionAnnotation(page, rectangle);
		var color = hexToColor(colorHex);

		annotation.setModified(new Date());



To ensure a timely and accurate response, please attach the following resources here for testing:

  • Your input PDF.
  • Please attach the output PDF file that shows the undesired behavior.
  • Please create a sample Java application (source code without compilation errors) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip and upload them.

test.7z (242.8 KB)

Input file, output file and java app are in archive


We have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as PDFJAVA-41155. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

The issues you have found earlier (filed as PDFJAVA-41155) have been fixed in Aspose.PDF for Java 22.2.