CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Printer Dll.

  1. #1
    Join Date
    Apr 2009

    Printer Dll.

    Hi. I'm unsure if this is the right topic, but since
    GDI is mentioned i'll give it a go.

    I need a very simple dll (COM/OCX) for printing reciepts at
    a receipt printer.
    The ideal functionality of the
    function should be :

    Print(string printername, string fontname, string PrinterOutput).

    It's important that it's possible to use the native
    fonts of the printer(Device Specific?), using TrueType
    fonts will make the print slow.

    I've looked around, but i've only found components that
    by far exceed my simple needs.

    Does anyone know a component that match my needs ?

  2. #2
    Join Date
    Apr 2009

    Smile Re: Printer Dll.

    I have not seen such a DLL, but I have written programs for small printers. I used the standard fonts of the printers. I found the explanations I needed in the programming manuals that I could donwload for free from the web sites of the constructors. These printers have their own languages. I saw ZPL and EPL. You write lines of comands in a file, and then send the file to the printer via FTP or another way. Here is a commented example in EPL:
    ; Set label width in dots
    ; Select print speed 50mm/s (medium speed) 1is low speed, 4 is high speed.
    ; Enable direct thermal mode
    ; Enable top of form backup
    ; Disable Windows command mode
    ; Printing from top of image buffer
    ; Set form length 1218 with a gap of 25
    ; Clear image buffer
    ; Select font 8-bit, first resident font
    ; Define the location, font, and string of characters to be printed
    ; Ax,y,rotation,fontsize(1-5),hmulti(1-6),vmulti(1-9),
    ;    reverse(N=normal),"text"(in quotes)
    A50,62,0,5,1,1,N,"Test Ascii text"
    ; Print

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)