From: Bill Erickson Date: Fri, 18 Nov 2016 21:29:00 +0000 (-0500) Subject: Hatch logging properties file / print fixes X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=61e1b74251878575358a4c55d8185ca2591a8d14;p=working%2FHatch.git Hatch logging properties file / print fixes Signed-off-by: Bill Erickson --- diff --git a/src/org/evergreen_ils/hatch/PrintManager.java b/src/org/evergreen_ils/hatch/PrintManager.java index 4121dd5d37..4b46427a89 100644 --- a/src/org/evergreen_ils/hatch/PrintManager.java +++ b/src/org/evergreen_ils/hatch/PrintManager.java @@ -303,11 +303,9 @@ public class PrintManager { } String paperSource = settings.optString("paperSource"); - logger.finer("paper source = " + paperSource); if (paperSource != null) { for (PaperSource source : printerAttrs.getSupportedPaperSources()) { - logger.info("looking at paper source: " + source.getName()); if (source.getName().equals(paperSource)) { logger.finer("Found paper source: " + paperSource); jobSettings.setPaperSource(source); @@ -316,23 +314,26 @@ public class PrintManager { } } - JSONArray pageRanges = settings.optJSONArray("pageRanges"); + if (!settings.optBoolean("allPages", true)) { + JSONArray pageRanges = settings.optJSONArray("pageRanges"); - if (pageRanges != null) { - List builtRanges = new LinkedList(); - int i = 0, start = 0, end = 0; - do { - if (i % 2 == 0 && i > 0) - builtRanges.add(new PageRange(start, end)); + if (pageRanges != null) { + List builtRanges = new LinkedList(); + int i = 0, start = 0, end = 0; + do { + if (i % 2 == 0 && i > 0) + builtRanges.add(new PageRange(start, end)); - if (i == pageRanges.length()) break; + if (i == pageRanges.length()) break; - int current = pageRanges.getInt(i); - if (i % 2 == 0) start = current; else end = current; + int current = pageRanges.getInt(i); + if (i % 2 == 0) start = current; else end = current; - } while (++i > 0); + } while (++i > 0); - jobSettings.setPageRanges(builtRanges.toArray(new PageRange[0])); + jobSettings.setPageRanges( + builtRanges.toArray(new PageRange[0])); + } } }