如何在Verifone vx520内置打印机上设置徽标 [英] how to set logo on verifone vx520 internal printer

查看:311
本文介绍了如何在Verifone vx520内置打印机上设置徽标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Verifone vx520的打印纸上设置徽标 我应该更改< * PTRLGO>值吗?以及如何更改< * PTRLGO>? 以及如何将该徽标下载到打印机?我应该如何在程序上调用徽标?我已经用c编写了程序. 这是我的代码,但这是错误的.我用GP命令打印徽标.

I want to set a logo on printed paper in verifone vx520 should i change the <*PTRLGO> value? and how can i change the <*PTRLGO>? and how can i download this logo to the printer? how should i call the logo on program? I have written my program with c. here is my code but it's wrong. i used GP command to print a 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.而是使用字体工具"从位图生成徽标文件.方法如下:

You shouldn't need to mess around with *PTRLGO. Instead, use the "Font Tool" to generate a logo file from a bitmap. Here's how:

  1. 打开该工具,然后转到文件"->导入".
  2. 导航到您的MONOCHROME位图(520仅具有单色屏幕,因此不必担心此限制).
  3. 选择另存为",并将类型更改为"ITP徽标文件(* .lgo)".
  4. 对于选择打印机",请选择Verix 37xx,然后单击确定".
  5. 请务必记得将新徽标文件下载到终端.

注意#4:据我所知,3740、3750、3730/510、570和520都使用37xx打印包.

NOTE on #4: The 3740, 3750, 3730/510, 570 and 520 all use the 37xx print pak, as far as I'm aware.

现在,您已经将徽标文件下载到了TERMINAL的存储器中,但是终端机的PRINTER具有其自己的存储器,您必须先将其加载到那里,然后才能告诉打印机进行实际打印.这是一些应该起作用的代码:

Now you have the logo file downloaded to the TERMINAL'S memory, but the terminal's PRINTER has its own memory, and you have to load it there before you can tell the printer to actually print it. Here's some 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'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");
}

如果您正确完成了所有操作,则应该可以打印出徽标:

If you have done everything correctly, you should be able to print the logo out:

这篇关于如何在Verifone vx520内置打印机上设置徽标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆