Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cutting paper after printing bmp with @ ... SAY

Status
Not open for further replies.

john255

Programmer
Jul 19, 2011
4
SK
Hi,
I am trying to make a receipt with a logo on it. For printing I use this line:
@ 1,16 SAY "C:\logo.bmp" BITMAP and I want the printer to cut the paper then, right at the next line below the picture, is there a way to do it using @SAY? Because when I try using ??? and correct escape command I always end up cutting the paper 3 lines below the logo.
 
You may try ?? instead of ???, but actually the time to do such low level adressing of printers is over. I'd strongly suggest in migrating over to usage of FRX or LBX or some third party printing tool, eg an SDK coming with a voucher or receipt printer.

Admitted, those are not all purpose GDIplus printers, Windows printing is not low level printing anyway.

Bye, Olaf.
 
Also, just asking the obvious: Is it really ??? or does the BMP file simply have a margin, then the simples solution would be to cut bottom margin off the image. ??? does not mean print three lines.

Bye, Olaf.
 
thank you for your reply, but if I may add, this is my code concerning the say and ???:
@ 0,16 SAY "C:\logo.bmp" BITMAP 1.75,1.75 ISOMETRIC
SET PRINTER TO
??? " "
??? (_EOL)
??? (_CUT)
SET PRINTER TO
I am printing on epson TM88ii/TM88iii, dont know any other way how to make the receipt in such way as it is now. The only thing remaining is cutting the paper right at the next line.
 
You know better than me what kind of control codes to send to your epson TM88ii/TM88iii printer. I don
t have any kind of printer, nor am I able to lookup what to send to it.

From the code it looks the _CUT constant is the code you need to cut, so have you simply tried to not send the space and _EOL and onyl the _CUT?

Have you opened the BMP in paint and checked, if it simply has a bottom margin shifting the receipt down?

Bye, Olaf.
 
EOL is just line feed, without it the cut wont work. Margin of the picture does not matter, even if I try just printing text with @ ... say, the printer always skips some lines before cutting the receipt.
 
the printer always skips some lines before cutting the receipt.

Then issue a few Reverse Line Feeds just before you issue your _CUT command to take that into account.

Note - many printers have their own set of Programming Command Language (PCL) commands - so I have no idea what the Reverse Line Feed command might be for your specific printer. I am sure you can look it up.

Good Luck,
JRB-Bldr
 
None of TM88 which I work with is able to reverse feed the paper, but now I am trying to change the approach, i have found epson utility for storing bmp images into the printer, the only problem I have is with printing them, the command should like like this FS p n m where 1 ? n ? 255 and 0 ? m ? 3, 48 ? m ? 51. How should I write the m?
_logo = CHR(28) + 'p' + '1' + ???
 
and 0 ? m ? 3, 48 ? m ? 51. How should I write the m?

This isn't algebra, it's magic.

m is greater than 0 but less than 3 AND it's greater than 48 but less than 51?

There isn't a value that meets those criteria, no matter what the value represents.

I suspect you've perhaps either misrepresented or misinterpreted the requirements. You need to figure out the actual need, but there's nothing presented here that helps do that.
 
I'd say for p n m you need to send chr(p)+chr(n)+chr(m), not the decimal string representations of p, n and m.

Bye, Olaf.
 
They probably need to be BITANDed, actually, but m still can't hold two mutually exclusive values.
 
I think either john made a typo or there is an error in the manual, as there are three variable p,n and m I'd guess that 1<=p<=255, 0<=n<=3 and 48<=m<=51. Something like that would make more sense at least.

Bye, Olaf.
 
actually looking at the PDF jrbbldr linked, the manual is correct about the differing contradicting limits for m, but they are for differnt printer types, you need to choose the value approprpiate for your printer. And the p actually is the letter 'p'. Decimal and HExadecimal values are given, so that you can use them for chr(value).

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top