# PrinterWrapMode options

**URL:** <https://community.thinkgeo.com/t/printerwrapmode-options/10050>\
**Category:** WinForms\
**Created:** [April 12, 2021, 12:00pm UTC](https://community.thinkgeo.com/t/printerwrapmode-options/10050 "2021-04-12T12:00:11Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonathan3](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/j/c68b51/32.png) [@Jonathan3](https://community.thinkgeo.com/u/Jonathan3)\
**Post date:** [April 12, 2021, 12:00pm UTC](https://community.thinkgeo.com/t/printerwrapmode-options/10050/1 "2021-04-12T12:00:11Z")

</div>

Hi,

There are two options for PrinterWrapMode (WrapText and AutoSizeText) but neither quite do what our customers would like. What we would like is for the text to stay at the font size the user selected (so cannot auto size) but also not to break up to extra lines - as people want to choose where that happens (so cannot auto wrap either).

Is there a way I can get the desired behaviour?

Regards,  
Jonathan

---

<div class="post-metadata">

**Author:** ![Jonathan3](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/j/c68b51/32.png) [@Jonathan3](https://community.thinkgeo.com/u/Jonathan3)\
**Post date:** [April 13, 2021, 8:55am UTC](https://community.thinkgeo.com/t/printerwrapmode-options/10050/2 "2021-04-13T08:55:49Z")

</div>

Hi, any thoughts on this one? I was thinking there could have been a 3rd option like:  
PrinterWrapMode.Off or .None

Jonathan

---

<div class="post-metadata">

**Author:** ![Jack](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/j/cc9497/32.png) [@Jack](https://community.thinkgeo.com/u/Jack)\
**Post date:** [April 13, 2021, 2:48pm UTC](https://community.thinkgeo.com/t/printerwrapmode-options/10050/3 "2021-04-13T14:48:34Z")

</div>

Hi Jonathan,  
I sent response to the wrong thread yesterday.

Here’s a simple implementation of CustomLabelPrinterLayer which do not wrap nor auto resize text font.  
class CustomLabelPrinterLayer : LabelPrinterLayer  
{  
protected override void DrawCore(GeoCanvas canvas, Collection labelsInAllLayers)  
{  
if (String.IsNullOrEmpty(base.Text))  
{ return; }

```
	double oneToOneScale = PrinterHelper.GetPointsPerGeographyUnit(canvas.MapUnit);
    float drawingSize = (float)(Font.Size * oneToOneScale / canvas.CurrentScale);
    GeoFont drawingFont = new GeoFont(Font.FontName, drawingSize, Font.Style);
    RectangleShape currentBoundingBox = GetBoundingBox();

    canvas.DrawTextWithWorldCoordinate(base.Text, drawingFont, TextBrush, currentBoundingBox.GetCenterPoint().X, currentBoundingBox.GetCenterPoint().Y, DrawingLevel.LabelLevel);
}

```

}

Thanks,  
Jack

---

<div class="post-metadata">

**Author:** ![Jack](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/j/cc9497/32.png) [@Jack](https://community.thinkgeo.com/u/Jack)\
**Post date:** [April 13, 2021, 2:59pm UTC](https://community.thinkgeo.com/t/printerwrapmode-options/10050/4 "2021-04-13T14:59:35Z")

</div>

We were also thinking about adding the 3rd option on the PrinterWrapMode, will keep you updated when we have it added.  
Thanks,  
Jack

---

<div class="post-metadata">

**Author:** ![Jonathan3](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/j/c68b51/32.png) [@Jonathan3](https://community.thinkgeo.com/u/Jonathan3)\
**Post date:** [April 13, 2021, 3:36pm UTC](https://community.thinkgeo.com/t/printerwrapmode-options/10050/5 "2021-04-13T15:36:30Z")

</div>

Thanks, I will give that a go.

I did try using text with normal spaces replaced with non-breaking spaces and that looked to be working quite well. But suspect I would also need other non-breaking characters, like hyphen and dot, and not sure they exist.

Regards,  
Jonathan

---

<div class="post-metadata">

**Author:** ![Jack](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/j/cc9497/32.png) [@Jack](https://community.thinkgeo.com/u/Jack)\
**Post date:** [April 14, 2021, 2:28pm UTC](https://community.thinkgeo.com/t/printerwrapmode-options/10050/6 "2021-04-14T14:28:32Z")

</div>

Hi Jonathan,  
We added PrinterWrapMode.None as third option, and this won’t change font size nor wrap the text. Please give a try and let us know how it works for you.  
Thanks,  
Jack

---

<div class="post-metadata">

**Author:** ![Jonathan3](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/j/c68b51/32.png) [@Jonathan3](https://community.thinkgeo.com/u/Jonathan3)\
**Post date:** [April 15, 2021, 9:20am UTC](https://community.thinkgeo.com/t/printerwrapmode-options/10050/7 "2021-04-15T09:20:35Z")

</div>

That was quick work. I have tried it out and it works very well, thanks.  
Regards,  
Jonathan
