Page 1 of 1
DotMatrix-Mode / Plain Text export and text alignment
Posted: Thu Feb 04, 2010 11:42 am
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
DotMatrix-Mode / Plain Text export and text alignment
Posted: Sat Feb 06, 2010 2:44 am
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.
DotMatrix-Mode / Plain Text export and text alignment
Posted: Mon Feb 08, 2010 5:52 am
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
DotMatrix-Mode / Plain Text export and text alignment
Posted: Mon Feb 08, 2010 1:23 pm
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.
DotMatrix-Mode / Plain Text export and text alignment
Posted: Thu Feb 11, 2010 7:25 am
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
DotMatrix-Mode / Plain Text export and text alignment
Posted: Thu Feb 11, 2010 11:53 am
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.