protected void convertJpegToPdf (String strSrcFile, String strDstFile, String strProgArgs) {
        Object[] logParams = new Object[3];
        logParams[0] = strSrcFile;
        logParams[1] = strDstFile;
        logParams[2] = strProgArgs;
        logger.entering(getClass().getName(), "convertJpegToPdf", logParams);

        if (strProgArgs != null) {
            // Build the external program's argument list.
            try {
                List<String> argList = new LinkedList<String>();
                Scanner scanner = new Scanner(strProgArgs);
                scanner.useDelimiter("\\s");
                while (scanner.hasNext()) {
                    String token = scanner.next();
                    if (token.contains("$INFILE")) {
                        argList.add(token.replace("$INFILE", strSrcFile));
                    } else if (token.contains("$OUTFILE")) {
                        argList.add(token.replace("$OUTFILE", strDstFile));
                    } else {
                        argList.add(token);
                    }
                }
                runProgram(argList);
            } catch (Exception ex) {
                throw new RuntimeException(ex);
            }
        } else throw new IllegalArgumentException("progArgs == null");

        logger.exiting(getClass().getName(), "convertJpegToPdf");
        
    }