Text CanGrow works well on screen, but not on printer

Stimulsoft Reports.NET discussion
Peter Illes
Posts: 18
Joined: Tue Jun 26, 2007 8:04 am
Location: Hungary

Text CanGrow works well on screen, but not on printer

Post by Peter Illes »

I have a report where I use Text.CanGrow to have a field that can grow in height to accomodate long text. On screen preview the rendering is perfect. When I print the report though, some of the text is clipped away. I am using the latest version 2007.2 31/07/2007. I will send the report file to your email account.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Text CanGrow works well on screen, but not on printer

Post by Edward »

Please set TextQuality = WYSIWYG. In that case you get correct output to printer. This issue is connected with the following:
We use standard methods of GDI+ when render is processed in Standard mode. WYSIWYG is our mode and provides correct output in the most cases.

Sorry we cannot improve printing while Standard mode is used.

Thank you.
Peter Illes
Posts: 18
Joined: Tue Jun 26, 2007 8:04 am
Location: Hungary

Text CanGrow works well on screen, but not on printer

Post by Peter Illes »

Edward,

Your suggestion worked perfectly, thank you!

What are the performance implications? Is it safe to set all texts to WYSIWYG, or only those that exhibit rendering issues?

TIA,
Peter
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Text CanGrow works well on screen, but not on printer

Post by Edward »

The situation with the performance is following:

On lines with length up to 20-30 symbols we've got decrease of the performance by 2-3 times. If the length of the string is greater then the render in WYSIWYG will be slower then in Standard mode about 40-50 percents.

Thank you.
Stéphane
Posts: 74
Joined: Wed Dec 06, 2006 3:45 am
Location: Paris (France)

Text CanGrow works well on screen, but not on printer

Post by Stéphane »

Ok, but, in any event, we don't have a lot of choice if we want that the texts are printed correctly. Is it possible to define the TextQuality property globally for all texts on the report?
Guest
Posts: 182
Joined: Tue Jun 06, 2006 8:04 am

Text CanGrow works well on screen, but not on printer

Post by Guest »

Unfortunately, in the designer you can't change TextQuality for all texts at once. But this is possible from code:

Code: Select all

foreach (StiPage page in report.Pages)
            {
                foreach (StiComponent text in page.Components)
                {
                    if (text is StiText)
                    {
                        (text as StiText).TextQuality = StiTextQuality.Wysiwyg;
                    }
                }
            }
Thank you.
Stéphane
Posts: 74
Joined: Wed Dec 06, 2006 3:45 am
Location: Paris (France)

Text CanGrow works well on screen, but not on printer

Post by Stéphane »

I try the Wysiwyg quality because clipped text when printing is not very acceptable for my customers... With the Wysiwyg quality (and the last prerelease version), the Autowidth doesn't work correctly with a globalized text (in the Globalized Demo, set the Autowidth of the Text10 to true, TextQuality to Wysiwyg, Width to a little width, and you will see the problem).


To set TextQuality for all texts, I think that something like that is better :

Code: Select all

        public void SetTextQualityToWysiwyg(StiReport report)
        {
            foreach (StiPage page in report.Pages)
            {
                SetTextQualityToWysiwyg(page.Components);
            }
        }

        private void SetTextQualityToWysiwyg(StiComponentsCollection components)
        {
            StiText stiText;
            foreach (StiComponent component in components)
            {
                if (component is StiBand)
                {
                    SetTextQualityToWysiwyg(((StiBand)component).Components);
                }
                else
                {
                    if (component is StiText)
                    {
                        stiText = (StiText)component;
                        if (stiText.TextQuality != StiTextQuality.Wysiwyg)
                        {
                            stiText.TextQuality = StiTextQuality.Wysiwyg;
                        }
                    }
                }
            }
        }
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Text CanGrow works well on screen, but not on printer

Post by Vital »

I try the Wysiwyg quality because clipped text when printing is not very acceptable for my customers... With the Wysiwyg quality (and the last prerelease version), the Autowidth doesn't work correctly with a globalized text (in the Globalized Demo, set the Autowidth of the Text10 to true, TextQuality to Wysiwyg, Width to a little width, and you will see the problem).
Can you say me which latest prerelease version you are use for test (we have changed WYSIWYG mode on latest week)?

Thank you.


Stéphane
Posts: 74
Joined: Wed Dec 06, 2006 3:45 am
Location: Paris (France)

Text CanGrow works well on screen, but not on printer

Post by Stéphane »

I use the latest prerelease version for test (2007.08.03 D2005).
Guest
Posts: 182
Joined: Tue Jun 06, 2006 8:04 am

Text CanGrow works well on screen, but not on printer

Post by Guest »

We will have prepared the patch in the build from 07.08.2007 to fix this problem.

Thank you.
Post Reply