Copy link to clipboard
Copied
In ColdFusion Report Builder, is there a way to shrink text to fit a particular area? (as opposed to stretching with overflow)
Any help would be greatly appreciated!
- Chris
I did find another solution that does work relatively well. I added multiple fields for the one field on the report, having each of these fields on the report using a different font size. For each of these fields, I applied print conditions to assess the width (in pixels) of the text as an image. Based on the width of the image, the correct field with the font-size is used and all the text is within the particular area. This results with the desired effect.
For example, if the width of the te
...Copy link to clipboard
Copied
cam-chris wrote:
In ColdFusion Report Builder, is there a way to shrink text to fit a particular area? (as opposed to stretching with overflow)
Unfortunately not. The "Stretch with overflow" property is a grow-only setting. There is no equivalent property to do the opposite.
What scenario are you trying to deal with? There may be other solutions.
Copy link to clipboard
Copied
I did find another solution that does work relatively well. I added multiple fields for the one field on the report, having each of these fields on the report using a different font size. For each of these fields, I applied print conditions to assess the width (in pixels) of the text as an image. Based on the width of the image, the correct field with the font-size is used and all the text is within the particular area. This results with the desired effect.
For example, if the width of the text as an image is 383.73 pixels, the print condition where the font size is 26 is used.
Width of Text in Pixels | ||
---|---|---|
Greather Than or Equal To | Less Than or Equal To | Font Size |
0.00 | 374.99 | 28 |
375.00 | 399.99 | 26 |
400.00 | 429.99 | 24 |
430.00 | 469.99 | 22 |
470.00 | 509.99 | 20 |
510.00 | 579.99 | 18 |
Copy link to clipboard
Copied
Nice.
Thanks for posting your solution.