Это мой принтер Epson L6290. Ниже приведены поддерживаемые типы mime.
Код: Выделить всё
"application/octet-stream"
"image/pwg-raster"
"image/urf"
"image/jpeg"
"application/vnd.epson.escpr"
Код: Выделить всё
inPdf = fopen("test_raster_0604.tmp","wb");
if(inPdf == NULL){
LOG("pdftoraster() inPdf == NULL");
goto err1;
}else{
LOG("pdftoraster() inPdf != NULL");
inpdfdf = fileno(inPdf);
}
if ((raster = cupsRasterOpen(inpdfdf, pwgraster ? CUPS_RASTER_WRITE_PWG : CUPS_RASTER_WRITE)) == 0) {
exit(1);
}
selectConvertFunc(raster);
for (i = 1;i 0)
{
if (cupsWriteRequestData(http, buffer, bytes) != HTTP_STATUS_CONTINUE)
break;
}
LOG("Document send write done : %s", cupsLastErrorString()); ///successful-ok
if (cupsFinishDestDocument(http, dest, pInfo) != IPP_STATUS_OK)
{
LOG("Document send failed: %s", cupsLastErrorString()); ///client-error-document-format-error
}
}
Подробнее здесь: https://stackoverflow.com/questions/786 ... ror-occurs