Add document-format-preferred and include image/urf in the TXT record.
@@ -3610,6 +3610,8 @@ add_printer_formats(cupsd_printer_t *p) /* I - Printer */
ipp_attribute_t *attr; /* document-format-supported attribute */
char mimetype[MIME_MAX_SUPER + MIME_MAX_TYPE + 2];
/* MIME type name */
+ const char *preferred = "image/urf";
+ /* document-format-preferred value */
/*
@@ -3655,6 +3657,9 @@ add_printer_formats(cupsd_printer_t *p) /* I - Printer */
cupsArrayDelete(filters);
cupsArrayAdd(p->filetypes, type);
+
+ if (!strcasecmp(mimetype, "application/pdf"))
+ preferred = "application/pdf";
}
else
cupsdLogMessage(CUPSD_LOG_DEBUG2,
@@ -3692,6 +3697,8 @@ add_printer_formats(cupsd_printer_t *p) /* I - Printer */
attr->values[i].string.text = _cupsStrAlloc(mimetype);
}
+ ippAddString(p->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_MIMETYPE), "document-format-preferred", NULL, preferred);
+
#ifdef HAVE_DNSSD
{
char pdl[1024]; /* Buffer to build pdl list */
@@ -3739,6 +3746,8 @@ add_printer_formats(cupsd_printer_t *p) /* I - Printer */
strlcat(pdl, "image/png,", sizeof(pdl));
else if (!_cups_strcasecmp(type->type, "pwg-raster"))
strlcat(pdl, "image/pwg-raster,", sizeof(pdl));
+ else if (!_cups_strcasecmp(type->type, "urf"))
+ strlcat(pdl, "image/urf,", sizeof(pdl));
}
}
