Skip to content

Commit

Permalink
Prefer sending jobs in Apple Raster instead of in PDF
Browse files Browse the repository at this point in the history
If a destination printer supports both PDF and Apple Raster, and if it
is not a remote CUPS queue, prefer sending the job in Apple Raster, as
printers print this more reliably. PDF interpreters in printers are
often slow or can easily have bugs.

Should fix https://bugs.launchpad.net/bugs/2014976
  • Loading branch information
tillkamppeter committed Apr 3, 2023
1 parent 78e2ca2 commit 3eb66da
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions daemon/cups-browsed.c
Original file line number Diff line number Diff line change
Expand Up @@ -6913,13 +6913,14 @@ on_job_state (CupsNotifier *object,
}

// The priority order for the PDLs is the same as in the
// PPD generator in cupsfilters/ppdgenerator.c
// PPD generator in ppd/ppd-generator.c of libppd
document_format = (char *)malloc(sizeof(char) * 32);
if (cupsArrayFind(pdl_list, "application/vnd.cups-pdf") ||
cupsArrayFind(pdl_list, "application/pdf"))
if (cupsArrayFind(pdl_list, "application/vnd.cups-pdf"))
strcpy(document_format, "application/vnd.cups-pdf");
else if (cupsArrayFind(pdl_list, "image/urf"))
strcpy(document_format, "image/urf");
else if (cupsArrayFind(pdl_list, "application/pdf"))
strcpy(document_format, "application/vnd.cups-pdf");
else if (cupsArrayFind(pdl_list, "image/pwg-raster"))
strcpy(document_format, "image/pwg-raster");
else if (cupsArrayFind(pdl_list, "application/PCLm"))
Expand Down

0 comments on commit 3eb66da

Please sign in to comment.