Coordinate of left top corner is incorrect at updateText

I’m trying to “move” the layer named “Layer II” in attached image by using the updateText function.

logodpwit_006.zip (33.6 KB)

I am using the java version combined with the php-javabridge
I’m trying to move the layer with this function:

//Create a coördinate point
$point = new Java('com.aspose.imaging.Point',$left,$top);
		
//Update the text to the new location
$textlayer->updateText($text, $point);

When setting the values to
$top = 457;
$left = 582;

everything goes okay, but when going 1 higher in the top I get the following error:

java.lang.RuntimeException: PHP Warning: Unchecked exception detected: [[o:Response$UndeclaredThrowableErrorMarker]:"FATAL: Undeclared java.lang.RuntimeException detected. java.lang.Exception: Invoke failed: [[o:TextLayer]]->updateText((o:String)[o:String], (o:Point)[o:Point]). Cause: class com.aspose.imaging.internal.Exceptions.ArgumentException: Coordinate of left top corner is incorrect

before the move the coördinates where:
Left: 1512
Top: 759

When only changing the text the program doesn’t crash but when changing the location it does.
When going down (to say 100) for left it works without a problem.

Could you please tell me what I’m doing wrong here?

@tenbrinke,

I have observed the error image shared by you and request you to please share the working sample code reproducing the issue on your end. I also suggest you to please try verifying the same using plain Java sample so as to verify that issue is in API or not.

Here is the testscript I used where the error is produced.
if you change the value on line 34 to 582 it does work.
testscript.zip (34.4 KB)

@tenbrinke,

Thank you for sharing the information with us. An issue with ID IMAGINGJAVA-829 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be fixed.

The issues you have found earlier (filed as IMAGINGJAVA-829) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by mudassir.fayyaz

Hello,

Thanks for looking into this problem. But now when I use the updateText command the size of the textlayer is adjusted, but it isn’t adjusted to the size of the text within. from what I see it’s adjusted to an arbritrary size. Changing the lenght of the text doesn’t matter.

Included is a test script with the generated output. I use the java 18.2 version in combination with the php javabridge.
testscript_new.zip (50.8 KB)

@tenbrinke,

I have observed your comments. Our product team shared sample code to help you out. Please check attachment and share feedback with us if there is still an issue.code.zip (678 Bytes)

Hey,
I tried the different ways provided by in the code snippet but I only get a partially visible text while I would expect a fully visible text (this used to be the case in previous versions if I remember right).
How can I make sure the whole text is visible, if I try to increase the size of the layer this won’t work either…

@tenbrinke,

I have observed your comments. Can you please share generated result and expected result so that we can further investigate to help you out.

Here I have a script (test.php) which does all the different situations and the different outputs.
What I’m looking for is the output in test_expected.jpg .
Could you tell me what I need to do to get this expected result?

The expected result is made with 17.9 where it does resize the layer to fit all the text.
The new ones are made with 18.2.

Test_Files_Points.zip (139.6 KB)

@tenbrinke,

I have discussed your issue with product team in details. Your feedback has been shared with team. I request for your patience until further feedback is shared by them.

Any progress in this case?

@jpvandegiessen,

Can you please try using latest Aspose.Imaging for Java 19.1 on your end.