Commit 1a51bade authored by tianyi's avatar tianyi
Browse files

The last push was wrong

parent 161b5c23
Pipeline #63523 canceled with stages
......@@ -21,12 +21,12 @@ public class PdfCreator implements Page {
OutputStream writer = resp.getOutputStream();
File markdown = toMarkDown(answer, query);
// turn markdown to a pdf using pandoc
ProcessBuilder pb = new ProcessBuilder("pandoc",markdown.getName() , "-o",markdown.getName()+".pdf");
ProcessBuilder pb = new ProcessBuilder("pandoc",markdown.getName() , "-o","result.pdf");
File dir = new File("/tmp");
pb.directory(dir);
Process process = pb.start();
process.waitFor();
File pdf = new File("/tmp/"+markdown.getName()+".pdf");
File pdf = new File("/tmp/result.pdf");
writer.write(new FileInputStream(pdf).readAllBytes());
writer.close();
markdown.delete();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment