Skip to content

Introduce print-as-raster as printer/job attribute#1282

Merged
zdohnal merged 1 commit intoOpenPrinting:masterfrom
zdohnal:force-raster
Jul 7, 2025
Merged

Introduce print-as-raster as printer/job attribute#1282
zdohnal merged 1 commit intoOpenPrinting:masterfrom
zdohnal:force-raster

Conversation

@zdohnal
Copy link
Copy Markdown
Member

@zdohnal zdohnal commented Jun 2, 2025

EDITED - see the old version in history.

Some printers do not take kindly newer PDF versions which results in
omitting font characters in the printout. Such jobs print fine as a
raster, however retrying as raster depends on benevolence of the printer
firmware what it counts as an unrecoverable printing error.

In the past, we preferred raster over PDF in cups-filters, causing other
issues like with finishings, or solutions like generating PCLm PPD were
mentioned, however it would require a way how to define for which models
it should be used, and take of such database.

Thus introducing print-as-raster job attribute, which makes the job
to be printed as raster, and print-as-raster-default printer attributes,
which makes any job coming into the printer object to be printed as raster.

Internally it uses similar mechanism as raster retry, which was adjusted
to match both use cases now.

@zdohnal zdohnal requested a review from michaelrsweet June 2, 2025 15:27
Copy link
Copy Markdown
Member

@michaelrsweet michaelrsweet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea of this but would prefer to use a different attribute/option name, e.g., "print-as-raster", to keep the naming consistent with other print mode options/attributes.

Also, the job-state-reasons keyword needs to stay as "cups-retry-as-raster" since we save this information (when a job had to be retried) for accounting/diagnostic purposes.

Comment thread backend/ipp.c Outdated
Comment thread backend/ipp.c Outdated
Comment thread cups/encode.c Outdated
Comment thread scheduler/ipp.c Outdated
Comment thread scheduler/ipp.c Outdated
Comment thread scheduler/job.c Outdated
Comment thread scheduler/job.c Outdated
Comment thread scheduler/job.c Outdated
Comment thread scheduler/job.c Outdated
Comment thread scheduler/job.h Outdated
@zdohnal zdohnal changed the title Transform retry_as_raster into force_raster Introduce print-as-raster as printer/job attribute Jun 6, 2025
@zdohnal zdohnal force-pushed the force-raster branch 2 times, most recently from 1583a91 to bec5409 Compare June 6, 2025 06:48
@zdohnal
Copy link
Copy Markdown
Member Author

zdohnal commented Jun 6, 2025

@michaelrsweet thank you for the review! I have applied the feedback + taken the liberty to update man pages to include the option. Feel free to check once you have the moment.

@zdohnal zdohnal requested a review from michaelrsweet June 6, 2025 07:19
Copy link
Copy Markdown
Member

@michaelrsweet michaelrsweet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor change and we are good. I think I also want to update the cupsdCreateCommonData function in scheduler/printers.c to include a "print-as-raster-supported" boolean attribute with value true.

Comment thread scheduler/job.c Outdated
Some printers do not take kindly newer PDF versions which results in
omitting font characters in the printout. Such jobs print fine as a
raster, however retrying as raster depends on benevolence of the printer
firmware what it counts as an unrecoverable printing error.

In the past, we preferred raster over PDF in cups-filters, causing other
issues like with finishings, or solutions like generating PCLm PPD were
mentioned, however it would require a way how to define for which models
it should be used, and take of such database.

Thus introducing `print-as-raster` job attribute, which makes the job
to be printed as raster, and `print-as-raster-default` printer attributes,
which makes any job coming into the printer object to be printed as raster.

Internally it uses similar mechanism as raster retry, which was adjusted
to match both use cases now.
@zdohnal
Copy link
Copy Markdown
Member Author

zdohnal commented Jun 10, 2025

Added, thank you!

@zdohnal zdohnal requested a review from michaelrsweet June 10, 2025 12:58
Copy link
Copy Markdown
Member

@michaelrsweet michaelrsweet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zdohnal zdohnal merged commit bcb4814 into OpenPrinting:master Jul 7, 2025
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants