我想在verifone vx520中在打印纸上设置徽标 我应该改变< * PTRLGO>值?以及如何更改< * PTRLGO>? 以及如何将此徽标下载到打印机?我该怎么称呼节目上的标识?我用c写了我的程序。 这是我的代码,但它错了。我使用GP命令打印徽标。
#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);
}
答案 0 :(得分:3)
你不应该惹恼*PTRLGO
。而是使用“字体工具”从位图生成徽标文件。方法如下:
关于#4的注意事项:就我所知,3740,3750,3730 / 510,570和520都使用37xx打印纸。
现在您已将徽标文件下载到TERMINAL'S内存,但终端的PRINTER有自己的内存,您必须先将其加载到那里,然后才能告诉打印机实际打印它。以下是一些应该有效的代码:
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");
}
如果您已正确完成所有操作,则应该可以打印徽标: