Click here to Skip to main content
Licence 
First Posted 27 May 2002
Views 77,451
Bookmarked 19 times

Arabic Fast Print on Receipt Printers

By | 28 May 2002 | Article
Allows Arabic POS system developers to work the easiest way on thier receipt printers.

The main screen of the demo program.

Introduction

This control is designed for those Arabic developers who are developing systems with receipt printers and want to print Arabic/English characters. This component does not use the graphic mode drivers supplied by the printer manufacturers.

It's fully tested over Citizen CBM series, and under testing on Epson TM series.

The control uses ESC commands which is the most common among several manufacturers of receipt printers.

History

We developed a POS software, and one of the problems we faced was how to print Arabic characters on the receipt printer without using the Windows drivers, and to print Arabic/English at the same line, and considering the language orientation. All this should be faster than that by the Windows graphic drivers.

So, we solved this problem. We developed a VC++ code and solved the problem in a genius way. And for other developers, we made an ActiveX control to deal with the receipt printers.

Usage

The main features:

The developer can use the character set(s) downloaded into the printer, but how to avoid that headache?

  1. It's ActiveX control, can be embedded into any other development language.
  2. It uses the common ESC commands for the printers, so it can work with many printer brands.
  3. It works, even if the desired language character set is not downloaded into the printer ROM. We printed Arabic on a Citizen receipt printer in CBM printers center in Japan where: No Arabic character set on the printer, no windows OS supporting Arabic!!
  4. It's not just Arabic, it can print any other language characters. First, we download the characters into the ActiveX. Besides English.
  5. It's not required that the Windows operating system support that language at all. We print Arabic characters using Citizen receipt printers & Epson on Citizen Japan Ltd. on Windows computer with JP Languages!
  6. It's so easy to use, all the user has to do:
    1. Insert the ActiveX in to his program.
    2. Control.Open (The COM port used here / LPT port).
    3. Choose the Character Mode (32 International characters, or extended 79 characters for Arabic figures).
    4. Load characters (once the control is open).
    5. Choose the language to print and print whatever you want.
    6. User can: print empty line, change orientation, skip line(s), print with/out line feeds, ...

    And at the end of program, just do close the control.

Sample code:

// The activeX control name is: PrnX for example
void InitPrn (CString pComPort)
{
    PrnX.OpenPort (pComPort);
    PrnX.Reset(); //Rest the printer

    //1 = 79 Figures(extended mode for Citizin CBM printers and similars)
    //2 = 32 Figures(restricted mode for Epson & 32
    //       International characters only)
    PrnX.SetChMode (1);

    PrnX.Init();
    //Initialize the printer status & buffer

    PrnX.LoadCharsDefs();
    //Load the international characters into the printer

}

void PrintText (CString pText, short pAllignment)
{
     // Left, Center, Right PrnX.SetAllignment (pAllignment);

     //vLines = Number of empty lines after the print operation. Can be Zero
     short vLines = 2;  

     // Print now as you want.
     // pText may be " any local/english text here
     // -arabic version here- " PrnX.CBMPrint (pText, vLines);

     //And can use PrnX.FeedLine(vLines) also

     //And can do PrnX.CutSheet() to cut the paper if the printer support it
}

void ClosePrnPort ()
{
  PrnX.ClosePort();
}

It's so simple, and very small in size.

If any one wants a demo, we are happy to send the demo version immediately. (Arabic characters exist now, other languages upon request.)

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Tarek Eslim



Palestinian Territory (Occupied) Palestinian Territory (Occupied)

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralBaud Rate Pinmembermikeeball2:19 15 Feb '11  
QuestionArticle Source Code PinmemberCDRom8:47 19 Oct '07  
QuestionEpson TM-T88 Compatible Pinmemberlukejarvis20:19 4 Sep '07  
QuestionCan you help me to assign a character table on my EPSON TM-U210A? Pinmemberdima_sergei@tut.by2:16 14 Oct '04  
QuestionHow can I add a ESC command? PinmemberJason648818:51 28 Mar '04  
QuestionThe control is not working even with written code??? PinmemberMohammed Elian23:49 9 Dec '03  
Generalarabic support PinsussAnonymous20:18 15 Oct '03  
Generalcorrupt file Pinsusssalem2:16 18 Nov '02  
GeneralRe: corrupt file PinmemberTarek Eslim2:53 19 Nov '02  
General7elwaaa... PinsussAnonymous9:45 22 Sep '02  
GeneralRe: 7elwaaa... PinsussAnonymous5:05 5 Mar '03  
Generalquestionable approach PinmemberClaudius Mokler21:26 28 May '02  
GeneralRe: questionable approach PinmemberAnonymous7:35 29 May '02  
GeneralRe: questionable approach PinmemberPaul Belikian12:45 8 Jun '02  
GeneralBad link... Pinmemberjack Mesic14:53 28 May '02  
GeneralRe: Bad link... PinmemberTarek Eslim3:09 29 May '02  
GeneralRe: Bad link... PinmemberBABABIKHIAL20:16 14 Nov '08  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web04 | 2.5.120517.1 | Last Updated 29 May 2002
Article Copyright 2002 by Tarek Eslim
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid