Escape codes in dot-matrix printing

Stimulsoft Reports.WPF discussion
m.n
Posts: 33
Joined: Fri Jul 17, 2009 10:09 am

Escape codes in dot-matrix printing

Post by m.n »

Hello,

As anybody know, we have no support for escape codes in dot-matrix mode. Output text stream contains only line end (CRLF) and page break (NL) codes.
Unfortunately our favorite company (i.e. Stimulsoft) says "no plans for such a thing".

So, is there anybody who use dot-matrix printing? Have you found a workaround for lack of escape codes support?
Maybe we could make an injection of codes while printing, I mean: when text component is going to print, our special script checks its properties for bold, italic and so on, and injects appropriate escape code. That's all for whole "escape codes" problem. Looks simple, but I can't find a way to do this.

What do you think about this idea?
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Escape codes in dot-matrix printing

Post by Jan »

Hello,

Can you say which escape codes you need to support?

Thank you.
m.n
Posts: 33
Joined: Fri Jul 17, 2009 10:09 am

Escape codes in dot-matrix printing

Post by m.n »

It'd be nice to have all of them, not only my favorite. ;)

I think the basic ones (i.e. most important) are:
1. Bold
2. No Bold
3. Italic
4. No Italic
5. Underline
6. No Underline

Middle priority:
7. SuperScript
8. SubScript
9. NoSuperSubScript
10. Printer font selection (based on font used in report)
11. Select color (for 2-color printers, select BLACK or RED)

Low priority:
12. Double
13. NoDouble
14. DoubleLine
15. NoDoubleLine
16. Condensed
17. NoCondensed
18. DoubleHeight
19. NoDoubleHeight
20. Send raster graphics

Control codes for points 1-11 do not change character's width and height, so it can easily be done with just injecting the escape code.
For 12-19 character's dimensions are changing, so it is a little tricky, it should be known at rendering phase.

I didn't write any escape code explicitly, because it doesn't matter what it is (and it can be one of standard set like Epson ESC/P or HP PCL or any non-standard). For example if text component has "Bold" property set, in dot-matrix's stream we should have:
[escape code for Bold]
[component's text]
[escape code for NoBold]
So it goes for every code I enumerated above.

I think new events are the best solution. One event just before sending component content to the printer stream, and another one just after component has been sent. I can do inspection of the component and inject my escape code based on my inspection.

Any ideas are welcome.
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Escape codes in dot-matrix printing

Post by Jan »

Hello,

Some time ago we have made some changes in dot-matrix mode regarding escape codes. Dot-matrix mode is result of export to text. Try to place escape codes directly to text expression, for example:

{(int)27}+test

It must work. Also we will try extend dot-matrix mode.

Thank you.
m.n
Posts: 33
Joined: Fri Jul 17, 2009 10:09 am

Escape codes in dot-matrix printing

Post by m.n »

Jan wrote:{(int)27}+test
The above example gives 27+text as an output (both in standard and dot-matrix preview) - are you sure it is correct syntax?

Anyway, this is not a solution, but kind of workaround. If I put escape codes in component content, the report is to be printed on specific type of printer only. And if I change component property (for example Bold), I have to remember to edit its content and modify escape codes.

I'm sure you (Stimulsoft team) can improve dot-matrix printing a little.

Does anyone besides me (want to) use a dot-matrix printing?
Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

Escape codes in dot-matrix printing

Post by Andrew »

Hello,

Starting with the version 2009.2 you may use Escape-sequences in text, for example:

{(char)15 + "Your condensed text " + (char)18 + "and normal text"}

We are examining the question regarding improving the dot-matrix mode.

Thank you.
m.n
Posts: 33
Joined: Fri Jul 17, 2009 10:09 am

Escape codes in dot-matrix printing

Post by m.n »

So casting to char, not int. OK.
Andrew wrote:{(char)15 + "Your condensed text " + (char)18 + "and normal text"}
Yes, it works, but how to set bold font (ESC E) and cancel bold (ESC F) for example?

Code: Select all

{(char)27+(char)69+"My bold text"+(char)27+(char)70}
gives us 96My bold text*F output, where * is ASCII 27 and there is no any other control codes.

Andrew wrote:We are examining the question regarding improving the dot-matrix mode.
Thank you.
LukasT
Posts: 306
Joined: Mon May 03, 2010 2:50 am
Location: Czech Republic

Escape codes in dot-matrix printing

Post by LukasT »

We are on your side, m.n. ;-)
I thing, text printing is very often topic in every reporting tool... and I am shure, that is still actual topic... a lot of our custommers have dot matrix printers for printing receipts and labels and they really don't want to displace theese expensive and reliable printers...
We have some workaround now, it is based on merging text output and mrt and filling esc markups on assigned places... but it means, that DotMatrix preview is not usable for us, because there can't be shown theese markups...
Improvement will be admitted with rejoicing :-)
Thank you!
m.n
Posts: 33
Joined: Fri Jul 17, 2009 10:09 am

Escape codes in dot-matrix printing

Post by m.n »

LukasT wrote:We are on your side, m.n. ;-)
Good to hear that, but most important: Stimulsoft team is also. :-)
Let's keep our fingers crossed for them to improve dot-matrix printing.
Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

Escape codes in dot-matrix printing

Post by Andrew »

Hello,

We are about to start development these Escape-sequences. It will take some time (several weeks).

Thank you.
Post Reply