Control codes to printer

Make comments, ask questions, or just complain about the software on this site. Or comment on any educational software.
Please note that by clicking on links that may appear in these posts that you may be leaving the Dale Harris Educational Software website and that the content of those sites is the sole resposibility of the authors of those sites.

Moderators:daleadmin, Dale Harris, Alan, Andrew

Post Reply
Tomi Päivinen
Occasional Poster
Posts:8
Joined:Sat Mar 29, 2008 10:06 am
Location:Kouvola, Finland
Contact:
Control codes to printer

Post by Tomi Päivinen » Tue Sep 23, 2008 10:55 am

Is it possible in DHPos to send control codes (like ESC/P2 or non-printing codes) to the printer? I bought a cheap dot matrix printer, but it requires the program to send control codes so that the output would be correctly aligned.
-Tomi.

IAN
Forum Regular
Posts:111
Joined:Sat Sep 23, 2006 9:26 pm
Location:UK, Birmingham

Re: Control codes to printer

Post by IAN » Tue Sep 23, 2008 12:47 pm

yes here is the list. if its not in the list you can usually dig it out of the internet and then theres something in the posconfig printer setup somewhere to change the esc commands i think im not too sure its been a very long times since i had to do that,, here is the link that i got of the dhpos homepage http://dhpos.com/popopen.htm
IAN

(Everything i say is a lie! so am i telling you the truth?)

Tomi Päivinen
Occasional Poster
Posts:8
Joined:Sat Mar 29, 2008 10:06 am
Location:Kouvola, Finland
Contact:

Re: Control codes to printer

Post by Tomi Päivinen » Tue Sep 23, 2008 1:46 pm

IAN wrote:yes here is the list. if its not in the list you can usually dig it out of the internet and then theres something in the posconfig printer setup somewhere to change the esc commands i think im not too sure its been a very long times since i had to do that,, here is the link that i got of the dhpos homepage http://dhpos.com/popopen.htm
I know that there is an option to send six codes to the printer to open the cash drawer, use the cutter etc. And I have the needed codes (they came with the printer). The problem is that I don't have a real receipt printer, but a bigger dot-matrix printer (however, this is the only one I've ever seen that is smaller than A4-paper size) and it doesn't open cash drawer or do anything but print. If I use the option F1 in the printer setup menu, does the program send the codes to the printer before or after the real printing commences? Because if it sends it afterwards, the codes are useless, because they won't affect the printer. My aim is to send the codes that makes the font condensed and smaller so it fits in 40 character paper. I'm also trying to make it print Scandinavian alphabets, but alas, without success; it doesn't matter whether I print straight from the program using LPT or aprint, the alphabets won't print right: Ä [a with diaeresis above it] comes out as Z with circumflex above it and Ö [o with diaeresis] prints as quotation marks in the bottom of the line. (And yes, they support them, because when printing in any program in Windows, they print as they should.)

It seems also to be difficult to the printer to understand that if the text is bold, it should fit into the same space as normal (it's nice that subtotal and total print as larger character, but the printer prints them beyond the paper...
-Tomi.

User avatar
daleadmin
Forum Owner
Posts:1279
Joined:Tue Dec 30, 2003 9:47 pm

Re: Control codes to printer

Post by daleadmin » Tue Sep 23, 2008 1:46 pm

Tomi,

What do you want the control codes to do?

Dale

IAN
Forum Regular
Posts:111
Joined:Sat Sep 23, 2006 9:26 pm
Location:UK, Birmingham

Re: Control codes to printer

Post by IAN » Tue Sep 23, 2008 5:25 pm

ahh right i think your using the printer as a generic text mode, you can change the font i think using aprint but i dont think you can in pos program
i dont think there is bold to be used in the program? i am unsure, been a long time as i said
there is no codes to be sent to a normal generic printer,, if your using LPT port its generaly plug n play but in windows you might need a driver if you dont have it in the list use "generic drivers" should work fine..
IAN

(Everything i say is a lie! so am i telling you the truth?)

User avatar
daleadmin
Forum Owner
Posts:1279
Joined:Tue Dec 30, 2003 9:47 pm

Re: Control codes to printer

Post by daleadmin » Tue Sep 23, 2008 6:44 pm

Tomi,

The open cash drawer code is sent before the receipt is printed, but of course only when printing the receipts. The cutter bar code is sent after a receipt is printed.

Dale

Tomi Päivinen
Occasional Poster
Posts:8
Joined:Sat Mar 29, 2008 10:06 am
Location:Kouvola, Finland
Contact:

Re: Control codes to printer

Post by Tomi Päivinen » Thu Sep 25, 2008 11:50 am

daleadmin wrote:Tomi,

What do you want the control codes to do?

Dale
I need the printer to use elite font, NLQ and condensed printing (the codes for these are (in hex 1B 78 01, 1B 50, 0F). If the codes are not send before printing, the print output is awful.

And btw, I noticed that the use of Scandinavian alphabets was the reason why the "subtotal" and "total" lines didn't fit to the receipt. For some reason, the printer understood them as control codes to temporarily increase the font size... (One thing is certain: when I set up my business and use DHPos, I will not use old printer, especially LPT or serial printers. They give me the headache.)
-Tomi.

Post Reply

Who is online

Users browsing this forum: No registered users and 277 guests