Removing spaces between words

Hello OL community

I would like to ask for some help regarding removing spaces.

I have invoice with some kind of lines:

00/20 G WI 0.25 11.00 1.94 3.95 XXX 5.99 0.0xxxxx 0.0xxxxx 3.98 2.93 xxx 1.05

When I set the font to Courier and size 8 then the width (length) of this record is too big and going outside the page (Will be truncated and not viisble)

Is it a way to make it not that wider to fit it?

I tried to use word-spacing but it change the formatting.
Like we have white-space: pre-wrap; so I need to keep formatting.

Any other ideas?

@Marten @hamelj @Sander

Hi @Odyn,

Have you considered using the following feature?

‘Copy Fit - PlanetPress Connect 2022.1 User Guide (link)’

Never seen it before, looks interesting.

But this will automatically set the font size (proportion) based on the width?

In my case the font needs to be 8 always.

Thanks @Marten

Another option you might consider is to apply the following CSS:

CSS:

#example {
    /* width: 90px; */
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

HTML:

<p id="example" style="width: 90px;">
    Welcome John Doe!
</p>

By applying these CSS properties to the above HTML code the following sentence…

Welcome John Doe!

…will looks like:

Welcome Jo...
2 Likes