3 Replies Latest reply: May 27, 2014 8:26 AM by Eddie Lotter RSS

    Shrink to Fit Text - ColdFusion Report Builder

    cam-chris Community Member

      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

        • 1. Re: Shrink to Fit Text - ColdFusion Report Builder
          Eddie Lotter Community Member

          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.

          • 2. Re: Re: Shrink to Fit Text - ColdFusion Report Builder
            cam-chris Community Member

            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 ToLess Than or Equal ToFont Size
            0.00374.9928
            375.00399.9926
            400.00429.9924
            430.00469.9922
            470.00509.9920
            510.00579.9918
            • 3. Re: Shrink to Fit Text - ColdFusion Report Builder
              Eddie Lotter Community Member

              Nice.

               

              Thanks for posting your solution.