Commit 158269d6 authored by Syretta Man's avatar Syretta Man

modified condition

parent aec7ecf4
Pipeline #112911 passed with stages
in 51 seconds
......@@ -37,7 +37,7 @@ public class WebServer {
if (filetype.equals("html")) {
resultPage.writeTo(resp);
} else if (filetype.equals("markdown")) {
} else if (filetype.equals("markdown") || filetype.equals("pdf")) {
File file = new File("answer.md");
BufferedWriter bw = new BufferedWriter(new FileWriter(file));
......@@ -74,7 +74,8 @@ public class WebServer {
if (filetype.equals("pdf")) {
ProcessBuilder pb = new ProcessBuilder();
pb.command("pandoc", "-s", "-o", "sample.pdf", "sample.md");
String[] cm = {"pandoc", "-s", "-o", "sample.pdf", "sample.md"};
pb.command(cm);
pb.start();
}
......
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