How to use those printer control commands ?

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

huangchenmin
Posts: 157
Joined: Mon Jun 07, 2010 2:24 am

Re: How to use those printer control commands ?

Post by huangchenmin »

miras wrote:Hi!
Try this after your printing code.
SET CONS OFF
.......
WinPrintRaw(cPrinter, "CUT.TXT", "CUT")
Hope that helps.
Best regards
Miras
Dear miras
thanks for your supports. Could you tell me what is the contents in "CUT.txt"?
Should I replace the cut command, which you posted with mine ?
Best Regards
chen min
User avatar
Rathinagiri
Posts: 5482
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: How to use those printer control commands ?

Post by Rathinagiri »

As you can see, cut.txt is created using 'set alter to' command.

You have to give the command sequence at the line starting with ?
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
huangchenmin
Posts: 157
Joined: Mon Jun 07, 2010 2:24 am

Re: How to use those printer control commands ?

Post by huangchenmin »

miras wrote:Hi!
Try this after your printing code.

SET CONS OFF
SET ALTE TO CUT.TXT
SET ALTE ON
?chr(27)+"i"+CHR(18) ///Cut if you can
SET ALTE OFF
SET ALTE TO
SET CONS ON
WinPrintRaw(cPrinter, "CUT.TXT", "CUT")
Hope that helps.
Best regards
Miras
Dear Miras
the HMG compiler told me he that could find reference of winprintraw().
What should I do next?
miras
Posts: 11
Joined: Thu Jul 31, 2008 7:57 am

Re: How to use those printer control commands ?

Post by miras »

Hi!
It is Abbougaga Jr C function and it is free.
Grigory Filatov <gfilatov@inbox.ru> translated for MiniGUI, but I'm not sure
whether the HMG has.
in my application works perfectly.

Best regardds
Miras
huangchenmin
Posts: 157
Joined: Mon Jun 07, 2010 2:24 am

Re: How to use those printer control commands ?

Post by huangchenmin »

huangchenmin wrote:Hello everyone:
I need to work with a printer, which will printer number for people waiting in line.
Attachment is the commands maunal. I can't figure out how to use those control command in HMG code block.
Could anyone help!
Best Regards
OK!
Here is current status!
I work successfully with following combination.
the build-in printsend() function help to solve the issue.
but it's not so stable.
I arranged a cut after a page was printed.
whenever the first time executed after compilered, 2 cuts continueously after 2 pages were printed.
anyway, it is pretty close to mt goal.
Thanks all of the poeple been help!
Best Regards
chen min
User avatar
Rathinagiri
Posts: 5482
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: How to use those printer control commands ?

Post by Rathinagiri »

Can I see the relevant code Chen?
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
huangchenmin
Posts: 157
Joined: Mon Jun 07, 2010 2:24 am

Re: How to use those printer control commands ?

Post by huangchenmin »

rathinagiri wrote:Can I see the relevant code Chen?
Give me couples of days.
I will post the latest version!
huangchenmin
Posts: 157
Joined: Mon Jun 07, 2010 2:24 am

Re: How to use those printer control commands ?

Post by huangchenmin »

rathinagiri wrote:Can I see the relevant code Chen?
Still working on it!
Not steable enought!
Attachments
TKPRN00.rar
(1.82 KiB) Downloaded 220 times
Post Reply