Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Wang, Vincent H
simplewebapp
Commits
71e9dc37
Commit
71e9dc37
authored
Jan 25, 2021
by
Euan Imperial
Browse files
Changed filename download
parent
751d5878
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/ic/doc/web/PDFResultPage.java
View file @
71e9dc37
...
...
@@ -16,7 +16,10 @@ public class PDFResultPage extends MarkdownResultPage {
File
markdown
=
getFile
();
resp
.
setHeader
(
"Content-Disposition"
,
"Inline; filename="
+
markdown
.
getName
()
+
".pdf"
);
String
file_name
=
markdown
.
getName
();
String
[]
parts
=
file_name
.
split
(
"."
);
resp
.
setHeader
(
"Content-Disposition"
,
"Inline; filename="
+
parts
[
0
]
+
".pdf"
);
ProcessBuilder
pb
=
new
ProcessBuilder
(
"pandoc"
,
markdown
.
getAbsolutePath
(),
"-o"
,
"result.pdf"
);
Process
p
=
pb
.
start
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment