diff --git a/src/qz/printer/PrintOptions.java b/src/qz/printer/PrintOptions.java index 810f3e039..a73504114 100644 --- a/src/qz/printer/PrintOptions.java +++ b/src/qz/printer/PrintOptions.java @@ -19,6 +19,7 @@ import java.awt.print.PageFormat; import java.awt.print.PrinterException; import java.awt.print.PrinterJob; +import java.util.ArrayList; import java.util.List; import java.util.Locale; @@ -113,7 +114,8 @@ public PrintOptions(JSONObject configOpts, PrintOutput output, PrintingUtilities psOptions.density = asymmDPI.optInt("feed"); psOptions.crossDensity = asymmDPI.optInt("cross"); } else { - List rSupport = output.getNativePrinter().getResolutions(); + List rSupport = output.isSetService() ? + output.getNativePrinter().getResolutions() : new ArrayList<>(); JSONArray possibleDPIs = configOpts.optJSONArray("density"); if (possibleDPIs != null && possibleDPIs.length() > 0) {