# Text source: size of rendered object ?

**URL:** https://discourse.paraview.org/t/text-source-size-of-rendered-object/11193
**Category:** ParaView Support
**Created:** [January 18, 2023, 8:11am UTC](https://discourse.paraview.org/t/text-source-size-of-rendered-object/11193 "2023-01-18T08:11:33Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![pcrepier](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/p/f4b2a3/32.png) [@pcrepier](https://discourse.paraview.org/u/pcrepier)
#### Post date: [January 18, 2023, 8:11am UTC](https://discourse.paraview.org/t/text-source-size-of-rendered-object/11193/1 "2023-01-18T08:11:33Z")

</div>

Hello everyone,

I am using a Text source to add labels on some pictures.  
I have now a case where the content of the label is longer than I expected. The consequence of that is that some of the content fall outside of the render view.  
I there a possiblity to retrieve the size of the label (width and height), either in pixels or relative to the render view size (from 0 to 1) ?  
If I can retrieve that info, I could then offset the source in the script and have the full text always appear on the picture.

Thanks in advance.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [January 18, 2023, 8:56am UTC](https://discourse.paraview.org/t/text-source-size-of-rendered-object/11193/2 "2023-01-18T08:56:25Z")

</div>

I’m afraid not directly no.

---

<div class="post-metadata">

### Author: ![pcrepier](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/p/f4b2a3/32.png) [@pcrepier](https://discourse.paraview.org/u/pcrepier)
#### Post date: [January 18, 2023, 9:03am UTC](https://discourse.paraview.org/t/text-source-size-of-rendered-object/11193/3 "2023-01-18T09:03:49Z")

</div>

What would the indirect way be ?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [January 18, 2023, 9:48am UTC](https://discourse.paraview.org/t/text-source-size-of-rendered-object/11193/4 "2023-01-18T09:48:34Z")

</div>

Creating your own plugin with a dedicated representation that will do the described computation.

---

<div class="post-metadata">

### Author: ![pcrepier](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/p/f4b2a3/32.png) [@pcrepier](https://discourse.paraview.org/u/pcrepier)
#### Post date: [January 18, 2023, 10:16am UTC](https://discourse.paraview.org/t/text-source-size-of-rendered-object/11193/5 "2023-01-18T10:16:13Z")

</div>

Ok. I have no idea how to do this, so I’ll try to think of a simpler solution like using a content size dependent offset or something of that sort. That should already get me far enough for the time being.
