How to install a logo on a verifone vx520 internal printer

I want to set the logo on printed paper in verifone vx520 should I change the <* PTRLGO> value? and how can i change <* PTRLGO>? and how can i download this logo to the printer? how can i name the logo in the program? I wrote my program with c. here is my code but it is wrong. I used the GP command to print the logo.

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <svc.h>

char myLOGO[]="testlogo.bmp";
char buf[200]="";
void main ()
{
    int i,t;
    char logo[]="*PTRLGO";
    char buf[500] = "";
    int prt_handle,prt_com;
    prt_handle = open(DEV_CONSOLE, 0);
    prt_com = open(DEV_COM4, 0);
    put_env(logo,myLOGO,1);    
    sprintf(buf, "%cGP1;",27);
    write(prt_com, buf, strlen(buf));
    SVC_WAIT (100);

    close(prt_com);    
}

      

+2


source to share


1 answer


You don't have to mess with *PTRLGO

. Instead, use the Font Tool to create a logo file from the bitmap. Here's how:

  • Open the tool and go to File -> Import.
  • Go to the MONOCHROME bitmap (the 520 only has a monochrome screen, so this limitation shouldn't be a concern).
  • Select "Save As" and change the type to "ITP Logo Files (* .lgo)".
  • For "Select Printer" select Verix 37xx and click "OK".
  • Be sure to forget to upload the new logo file to the terminal.

NOTE at # 4: 3740, 3750, 3730/510, 570 and 520 all use the 37xx print patch as far as I know.

You now have the logo file loaded into TERMINAL memory, but the PRINTER has its own memory and you need to load it there before you can tell the printer will actually print it. Here's the code that should work:



void PrintLogoToPaper()
{
    //open a printer handle and a file handle
    //Assume we have already acquired the printer from DevMan if you are using VMAC
    int hPrinter = hPrinter = open(DEV_COM4,0);
    int h_font_file = open("logo.lgo", O_RDONLY);

    //send the logo to the printer memory
    p3700_dnld_graphic_file (hPrinter, h_font_file);


    //Now that we have loaded the printer logo to the printer memory, 
    // we can tell the printer to actually print it out
    p3700_print_graphic(hPrinter, 0, 50);

    //remember to close your file and handles
    close(h_font_file);
    close(hPrinter);

    //Not sure why, but if you take this print message out, then the logo 
    //doesn't always print. Please update if you know a better solution.!
    clrscr();
    printf("Printing");
}

      

If you did everything correctly, you should be able to print the logo:

StackOverflow Logo printed on Vx520

+3


source







All Articles