Commit 161b5c23 authored by tianyi's avatar tianyi
Browse files

Changing the name of the pdf

parent 638b8c2c
Pipeline #63509 canceled with stages
in 7 minutes and 24 seconds
......@@ -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","res.pdf");
ProcessBuilder pb = new ProcessBuilder("pandoc",markdown.getName() , "-o",markdown.getName()+".pdf");
File dir = new File("/tmp");;
Process process = pb.start();
File pdf = new File("/tmp/res.pdf");
File pdf = new File("/tmp/"+markdown.getName()+".pdf");
writer.write(new FileInputStream(pdf).readAllBytes());
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