gpt4 book ai didi

point-of-sale - 如何在 verifone vx520 内部打印机上设置 Logo

转载 作者:行者123 更新时间:2023-12-04 08:15:19 27 4
gpt4 key购买 nike

我想在 verifone vx520 的打印纸上设置一个标志我应该更改 <*PTRLGO> 值吗?我该如何更改 <*PTRLGO>?以及如何将此 Logo 下载到打印机?我应该如何调用程序上的 Logo ?我用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);
}

最佳答案

您不需要乱用 *PTRLGO。相反,使用“字体工具”从位图中生成 Logo 文件。方法如下:

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

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

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

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");
}

如果你做的一切都正确,你应该能够打印出标志:

StackOverflow Logo printed on Vx520

关于point-of-sale - 如何在 verifone vx520 内部打印机上设置 Logo ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30092955/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com