#4364 get the temporary path programmatically
Showing
1 changed file
with
1 additions
and
1 deletions
... | @@ -51,7 +51,7 @@ public class LibreOfficeRenderer { | ... | @@ -51,7 +51,7 @@ public class LibreOfficeRenderer { |
51 | File outputFile = File.createTempFile("bfdcs-", "-tmpl"); | 51 | File outputFile = File.createTempFile("bfdcs-", "-tmpl"); |
52 | UtilIO.writeString(outputFile, output.toString()); | 52 | UtilIO.writeString(outputFile, output.toString()); |
53 | 53 | ||
54 | ProcessBuilder pb = new ProcessBuilder("libreoffice", "--headless", "--convert-to", "pdf", outputFile.getPath(), "--outdir", "/tmp"); | 54 | ProcessBuilder pb = new ProcessBuilder("libreoffice", "--headless", "--convert-to", "pdf", outputFile.getPath(), "--outdir", outputFile.getParentFile().getPath()); |
55 | Map<String, String> env = pb.environment(); | 55 | Map<String, String> env = pb.environment(); |
56 | env.put("HOME", "/home/ofbiz"); | 56 | env.put("HOME", "/home/ofbiz"); |
57 | env.put("USERNAME", "ofbiz"); | 57 | env.put("USERNAME", "ofbiz"); | ... | ... |
-
Please register or sign in to post a comment