Skip to content

Commit

Permalink
replaced chromaticity check again
Browse files Browse the repository at this point in the history
  • Loading branch information
Vzor- committed Apr 16, 2024
1 parent c3d6938 commit 7a23f22
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/qz/printer/action/PrintHTML.java
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ public void print(PrintOutput output, PrintOptions options) throws PrinterExcept
settings.setJobName(pxlOpts.getJobName(Constants.HTML_PRINT));
settings.setPrintQuality(PrintQuality.HIGH);

// If colortype is default, leave printColor blank. The system's printer settings will be used instead.
if (pxlOpts.getColorType() != PrintOptions.ColorType.DEFAULT) {
settings.setPrintColor(getColor(pxlOpts));
}
Expand Down
3 changes: 2 additions & 1 deletion src/qz/printer/action/PrintPixel.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ protected PrintRequestAttributeSet applyDefaultSettings(PrintOptions.Pixel pxlOp
PrintRequestAttributeSet attributes = new HashPrintRequestAttributeSet();

//apply general attributes
if (pxlOpts.getColorType().getAsChromaticity() != null) {
// If colortype is default, leave printColor blank. The system's printer settings will be used instead.
if (pxlOpts.getColorType() != PrintOptions.ColorType.DEFAULT) {
attributes.add(pxlOpts.getColorType().getAsChromaticity());
}
attributes.add(pxlOpts.getDuplex());
Expand Down

0 comments on commit 7a23f22

Please sign in to comment.