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

Free Support Forum - aspose.com

Problem with text wrap in FloatingBox

Hi,

I’m facing the problem when drawing a FloatingBox that contains a TextFragment, the wrapping of the text is taking place outside of the box. How can I achieve the text to wrap when it reaches the width of the FloatingBox?

I’ve attached an image what it currently looks like.

Edit: I’ve seen the width property of the Rectangle of the TextFragment, but it only has a ‘get’. Is there a way to constrain the width of this Rectangle according to the width of the FloatingBox?

text_wrap_gone_wrong.png (16.7 KB)

Best regards and thanks,
Sebastian

@schmidt89,

Can you please share source files along with generated result and sample project to further investigate this issue in details.

Hi @Adnan.Ahmad, thanks for your quick reply!

I can show you the method, which I’m currently working on to create the FloatingBox with the according TextFragment. I’ve logged the property values you would get at runtime and made screenshots from the original document note and the one that gets created with aspose.

I’ve added BackgroundColor to the one created with Aspose to visualize the constraints of the TextFragment.

Files.zip (18.8 KB)

Thanks and best Regards,
Sebastian

@schmidt89,

Can you please share complete working sample project along with generated file for further investigation.