ソースを参照

Merge pull request #45 from vrozkovec/master

getCommandAsArray() handles whitespaces properly
Jhonny Mertz 6 年 前
コミット
3cf2273535

+ 1 - 1
src/main/java/com/github/jhonnymertz/wkhtmltopdf/wrapper/Pdf.java

@@ -126,7 +126,7 @@ public class Pdf {
         try {
             String command = getCommand();
             logger.debug("Generating pdf with: {}", command);
-            Process process = Runtime.getRuntime().exec(command);
+            Process process = Runtime.getRuntime().exec(getCommandAsArray());
 
             Future<byte[]> inputStreamToByteArray = executor.submit(streamToByteArrayTask(process.getInputStream()));
             Future<byte[]> outputStreamToByteArray = executor.submit(streamToByteArrayTask(process.getErrorStream()));