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

Free Support Forum - aspose.com

Floatingbox top&left VS TextParagraph poistion

The positioning of PDF FLoatingbox starts from the upper left (left 0 & top 0), and the positioning of TextParagraph (x0 & y0) starts from the lower left. Is there any conversion relationship between the two? Or can you provide a PDF positioning architecture diagram about different APIs?


FloatingBox takes only top and left coordinates and API adjust it on page accordingly. The coordinating system that Aspose.PDF follows starts from bottom-left and every class in the API honors this coordinating system. OR you can say that the objects which require a Rectangle to position themselves, follow bottom-left as their starting position.

Thank you very much for your reply, I think I should understand the different coordinate system standards between the two.According to your suggestion, I tried to use com.aspose.pdf.Rectangel to position it, as you said, it can indeed achieve a similar effect. However, the text beyond the specified Rectangle is still displayed upwards. How to prohibit displaying outside the Rectangle is similar to setNeedRepeating(false) of FloatingBox.

In addition, I also tried to use com.aspose.pdf.drawing.Rectrangle to render text fragments within the specified area, but its positioning function uses a coordinate system similar to FloatingBox for positioning. Therefore, what method can I use to display text fragments within the specified area (width*height) and start from the bottom left (position).

Thanks again, respect.


Can you please share your expected PDF document with some details of your requirements.

As shared earlier, the objects that require Rectangle object with LLX, LLY, URX and URY properties, follow coordinating system starting from bottom-left.

If you want to add text at required position you can add it using different ways. For example, you can use TextFragment.Position property, you can use TextStamp, FloatingBox, TextParagraph, etc. If you share your complete and detailed requirements with us, we will be able to share appropriate solution with you in order to achieve them.