refactor code below  if( printerJ.contains("MagnificationType") ){
            args.append("--magnification");
            args.append(printerJ.value("MagnificationType").toString().split("\\").first());
        }
        if( printerJ.contains("smoothing") ){
            args.append("--smoothing");
            args.append(printerJ.value("smoothing").toString());
        }