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

Free Support Forum - aspose.com

Text is not at center for On-page Reference shape


I am encountering a situation where I have to add text in On-page reference shape. When I am creating shape with text and then resizing it, text is not rendered at center of shape.

PFA test case:
On-page reference text Issue.zip (151.7 KB)


We can formulate the position of text by setting TxtPinX and TxtPinY values in the shapesheet:


// set text position 

These lines of code do not work in your scenario. This issue has been logged under the ticket ID DIAGRAMJAVA-50545 in our bug tracking system. We have linked your post to this ticket and will keep you informed regarding any available updates.

In reference to the ticket ID DIAGRAMJAVA-50545, please download and try the latest Hotfix version: Aspose.Diagram for Java 17.8.1.

The linked ticket ID DIAGRAMJAVA-50545 has been fixed. Please download and try the new version 17.9 of Aspose.Diagram for Java API.