apple / cups

Apple CUPS Sources
https://www.cups.org
Apache License 2.0
1.85k stars 452 forks source link

Can I change pdf to urf format in CUPS? #6199

Open shinxxxxwon opened 2 weeks ago

shinxxxxwon commented 2 weeks ago

Implemented IPP printing function in Android using CUPS.

I print via CUPS in simple application/pdf format.

Printing was successful, but I found that there are quite a few printers that do not support PDF.

ipp_attribute_t* attr;
if ((attr = ippFindAttribute(response, "document-format-supported", IPP_TAG_MIMETYPE)) != NULL){
    ipp_attribute_t* attrTemp = attr;
    while(attrTemp->name){
        LOGE("2. attrTemp attr name => %s", attrTemp->name);
        attrTemp = attrTemp->next;
        if(attrTemp == NULL) break;
    }
}else LOGE("2. attr is null");

The printer I have with the code above

The mimetype commonly supported by the three printers was the image/urf format.

Since I create the content to be printed as a PDF, I need to change the format before printing. Is there a way to convert the format from pdf to urf?