Absolute position text

Hello,

I'm trying to absolute position a text on a page. I would like to draw a text the same way you do in GDI+, a text positioned with a rectangle and all the text that falls outside the rectangle gets clipped.

The way I would prefer to do this would be (or something similar):


Rect and text test Rect and text test Rect and text test
Rect and text test Rect and text test Rect and text test
Rect and text test Rect and text test Rect and text test
Rect and text test Rect and text test Rect and text test
Rect and text test Rect and text test Rect and text test

I tried several things, eg:






Rect and text test Rect and text test Rect and text test
Rect and text test Rect and text test Rect and text test
Rect and text test Rect and text test Rect and text test
Rect and text test Rect and text test Rect and text test
Rect and text test Rect and text test Rect and text test




But I can't get the result I want. Any suggestions?

/ Adrian Rosca

Hi Adrian,

Thank you for considering Aspose.

You can use floating box with borders. Please refer to “Working with Floating Box” at [http://www.aspose.com/Wiki/Default.aspx/Aspose.Pdf/](https://forum.aspose.com/Wiki/Default.aspx/Aspose.Pdf/).

Thank you for your help Tommy.

It almost worked as I wanted, except for one thing. The floating box expands when the texts overflows. I want the floatingbox to clip the text. I'm looking for the same effect you would get in HTML+CSS with the following code:


Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello
Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello
Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello
Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello
Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello
Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello

I used this xml for the floatingbox:

<Pdf xmlns="Aspose.Pdf">
<Section>
<FloatingBox Left="1cm" Top="2cm" Width="3,5cm" Height="3,5cm" BoxHorizontalPositioning="Page" BoxVerticalPositioning="Page" BackgroundColor="Gray">
<Border>
<All LineWidth="1"></All>
</Border>
<Text>
<Segment>
Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello
Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello
Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello
Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello
Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello
Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello
</Segment>
</Text>
</FloatingBox>
</Section>
</Pdf>

What am I missing?

With regards,
/ Adrian Rosca

Clipping text is not supported currently. We will support it later but it can’t be available in short time.

Hi Tommy,

I was wondering if this text clipping is currently available or not. This would make doing Mailing Labels more manageable.


Hi,

It is a known issue which had been logged as PDFNET-6248 in our defect tracking system. I think we need about one week to support it. I will send you an update once it is ready. Thanks for your patience.

Best regards.

Hi,

We have found a solution for this issue. However, we need aspose words team’s cooperation to implement it. We will consult with them and let you know our plan on it.

Best regards.