mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-02 13:12:13 +08:00
Improve memory utulization in PDF report generator [SCI-1482]
This commit is contained in:
parent
03743a21f6
commit
6824f9a8bc
2 changed files with 3 additions and 4 deletions
|
@ -182,7 +182,8 @@ class ReportsController < ApplicationController
|
|||
@html = '<h1>No content</h1>' if @html.blank?
|
||||
render pdf: 'report',
|
||||
header: { right: '[page] of [topage]' },
|
||||
template: 'reports/report.pdf.erb'
|
||||
template: 'reports/report.pdf.erb',
|
||||
disable_javascript: true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -10,9 +10,7 @@
|
|||
<body class="print-report-body">
|
||||
<div class="print-report">
|
||||
<% # Also whitelist <img> and <input type="checkbox"> tags %>
|
||||
<%= sanitize_input(fix_smart_annotation_image(@html),
|
||||
['img', 'input'],
|
||||
['type', 'disabled', 'checked']) %>
|
||||
<%= @html.html_safe %>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in a new issue