From b10ecfc259c18e307a6d6259e583c14c0bbdfa4c Mon Sep 17 00:00:00 2001 From: lxsang Date: Tue, 8 Nov 2022 10:32:26 +0100 Subject: [PATCH] Fix PDF export problem --- info/controllers/IndexController.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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")