Horizontal Alignment not working

Hello,

I am working with Aspose PDF for Java, version 19.4 to replace text and center it but the method setHorizontalAlignment is not working. I read some other post related to this issue but hasn’t been updated since 2019.

I also tried respecting the original text alignment but it is also not working. Text seems to be detected always as Left Alignment

Thanks in advance for the response

@aiturricha

Can you please share the sample code, source and output PDF file so that we may try to reproduce the same on our end. I also suggest you to please consider using the latest Aspose.PDF for Java 21.5 on your end.