DotMatrix-Mode / Plain Text export and text alignment

Stimulsoft Reports.NET discussion
Post Reply
Tobias
Posts: 104
Joined: Mon Nov 24, 2008 8:44 am

DotMatrix-Mode / Plain Text export and text alignment

Post by Tobias »

Hello,

In DotMatrix-Mode or when saving a preview as a text file, then the centered or right aligned text lines don't work.

Please see this example:

DotMatrixProblem.mrt

How can I make a text appear centered or right aligned for a DotMatrix printer?

And what exactly does the ZoomX/Y-Setting in the DotMatrix mode mean?

Thx,

Tobias
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

DotMatrix-Mode / Plain Text export and text alignment

Post by Ivan »

Hello,

When exporting to the text format, all coordinates and sizes of objects are recalculated to get the text appearance the same as it is in a report.
You can control the conversion, by changing the zoom coefficients of ZoomX and ZoomY.
- ZoomX = 100% equal to using the Pica font of printer (80 chars per line)
- ZoomX = 120% equal to using the Elita font of printer (96 chars per line)
- ZoomX = 170% equal to using the Condensed font of printer (136 chars per line)
- ZoomY = 100% equal to normal line spacing (1.0).

By default, if ZoomX = 100% and ZoomY = 100% then A4 page is converted to text with 80 characters in width and 62 rows in height.

P.S. If you use the font "Consolas, 13," a report in the preview will look almost the same as on the dot-matrix printer.

Thank you.
Attachments
331.DotMatrixProblem modified.zip
(1.85 KiB) Downloaded 270 times
Tobias
Posts: 104
Joined: Mon Nov 24, 2008 8:44 am

DotMatrix-Mode / Plain Text export and text alignment

Post by Tobias »

Ivan wrote: By default, if ZoomX = 100% and ZoomY = 100% then A4 page is converted to text with 80 characters in width and 62 rows in height.
Thanks!

So If I would put this into a formula it's:

text_columns = (page_width * zoom_x) / 24.637
text_rows = (page_height * zoom_y) / 45.725

Is there a way, I can pass the zoom values to the designer, so the user doesn't have to enter them in the dot matrix preview manually?

Tobias
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

DotMatrix-Mode / Plain Text export and text alignment

Post by Jan »

Hello Tobias,

Try to use following code:

Code: Select all

StiSettings.Load();
StiSettings.Set("Viewer", "ZoomX", zoomX);
StiSettings.Set("Viewer", "ZoomY", zoomY);
StiSettings.Save();
zoomX and zoomY values is strings.

Thank you.
Tobias
Posts: 104
Joined: Mon Nov 24, 2008 8:44 am

DotMatrix-Mode / Plain Text export and text alignment

Post by Tobias »

It doesn't work.

Code: Select all

StiSettings.Load();
StiSettings.Set("Viewer", "ZoomX", "100%");
StiSettings.Set("Viewer", "ZoomY", "100%");
StiSettings.Save();
Opening the DotMatrixPreview, it's always 125%. Even if I change this in the GUI it's not saved to the settings.
I've also tried "StiDotMatrixViewerControl", but this didn't work either.

Tobias
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

DotMatrix-Mode / Plain Text export and text alignment

Post by Jan »

Hello Tobias,
Tobias wrote:It doesn't work.

Code: Select all

StiSettings.Load();
StiSettings.Set("Viewer", "ZoomX", "100%");
StiSettings.Set("Viewer", "ZoomY", "100%");
StiSettings.Save();
Opening the DotMatrixPreview, it's always 125%. Even if I change this in the GUI it's not saved to the settings.
I've also tried "StiDotMatrixViewerControl", but this didn't work either.

Tobias
Thank you for your bug report. Problem fixed. Patch will be available in build from 15 Feb.

Sorry for troubles.

Thank you.
Post Reply