如何在 verifone vx520 内部打印机上设置徽标

how to set logo on verifone vx520 internal printer

我想在verifone vx520的打印纸上设置一个标志 我应该更改 <*PTRLGO> 值吗?我该如何更改 <*PTRLGO>? 以及如何将此徽标下载到打印机?我应该如何调用程序上的徽标?我用c写了我的程序。 这是我的代码,但它是错误的。我用GP命令打印了一个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);    
}

你不应该在 *PTRLGO 上乱来。相反,使用 "Font Tool" 从位图中生成徽标文件。方法如下:

  1. 打开工具并转到文件 -> 导入。
  2. 导航到您的 MONOCHROME 位图(520 只有单色屏幕,所以这个限制不应该是一个问题)。
  3. 选择 "Save As" 并将类型更改为 "ITP Logo Files (*.lgo)"。
  4. 对于 "Select Printer",选择 Verix 37xx 并单击确定。
  5. 一定要记得下载新的logo文件到终端。

关于 #4 的注意事项:据我所知,3740、3750、3730/510、570 和 520 都使用 37xx 打印包。

现在您已将徽标文件下载到终端的内存中,但终端的打印机有自己的内存,您必须先将其加载到那里,然后才能告诉打印机实际打印它。下面是一些应该有效的代码:

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's memory
    p3700_dnld_graphic_file (hPrinter, h_font_file);


    //Now that we have loaded the printer logo to the printer's 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");
}

如果一切正确,您应该能够打印出徽标: