aPrinterName=PrinterName;
aPSList->Add(" 350 30 moveto ");
aPSList->Add("("+aPrinterName+")"+" show");
aPSList->Add("showpage");
buffer = (char *)malloc(PRINT_BUF_SIZE);
OpenPrinterA(port, &printer, NULL);
di.pDocName ="";// wbuf;
di.pOutputFile = NULL;
di.pDatatype = TEXT("RAW");
StartDocPrinter(printer, 1, (LPBYTE)&di);
for(int i=0;i< aPSList->Count;i++)
{
aLine=aPSList->Strings[i]+" \r\n";
buffer=aLine.c_str();
WritePrinter(printer, (LPVOID)buffer, aLine.Length(), &written);
}
EndDocPrinter(printer);
ClosePrinter(printer);
but when I switch to the HP 20ps USB printer, can't print any thing, I also
tries using ghostscript 's tool , gview, no printer action.
but other apps like wordpad, can print with selection of (HP DesignJet 20PS
by HP only), I have checked in the code, the printer name I got is right,
HP 20ps is a inkjet UBS, PS emulation printer,
I have tried HP 2600 inkjet network printer, it's an ps emulation printer
too, my code works on it.
what could be the cause ? the USB ? the 20PS specific property ?
this 20ps printer, after installation, you can see in the control panel, two
icons related to 20ps, one is HP DesignJet 20PS by HP (this works with
wordpad...)
the other is hp designjet 20ps RIP, I have tried them both, nothing
happened, RIP is another tool that can accept loading printing job by
dragging ,
Got same problem that you has with usb printers,
is their an how to on how to send Raw data to usb printers
Regards
Luiz