diff --git a/info/controllers/IndexController.lua b/info/controllers/IndexController.lua index 17dd810..b798ee6 100644 --- a/info/controllers/IndexController.lua +++ b/info/controllers/IndexController.lua @@ -57,9 +57,7 @@ function IndexController:pdf(...) print(cmd) local r = os.execute(cmd) if r then - local mime = std.mimeOf(tmp_file) - std.header(mime) - std.f(tmp_file) + std.sendFile(tmp_file) return false else return self:error("Sorry.Problem generate PDF file")