How do talk with printer

sivakumar idyakavi at yahoo.com
Wed Nov 11 04:34:42 PST 2009


Hi,


      I want to talk with the printer i written some code that follows,

USBOpen()
{
char buff[256] = {0};
int fd=open("\dev\usb\lp0",O_RDWR);

  memset(buff,0,sizeof(buff));
  sprintf(buff,"\033!RIBLEN\r");
  retv =  write(fd,buff,strlen(buff));
  memset(buff,0,sizeof(buff));
  retv = write(fd,"\033E 2\r",strlen("\033E 2\r"));
  retv = read(fd,buff,sizeof(buff));

fprintf(stderr,"PPD RibbonLength=%s",buff);

}

where i should place the code (BackEnd/Filter/Shuduler),and i want to update this one to PPD file.

I am using

Fedora 10 OS
GNOME Desktop
CUPS 1.3


Thanking You





More information about the cups-devel mailing list