Use our font in pdf
This commit is contained in:
parent
1e1ae1ce3b
commit
34730eba2b
12 changed files with 89 additions and 17 deletions
|
|
@ -1,17 +1 @@
|
|||
prawn_document do |pdf|
|
||||
pdf.markup_options = {
|
||||
heading1: { style: :bold, size: 14, margin_bottom: 10, margin_top: 20 }
|
||||
}
|
||||
pdf.text @report.name, size: 22, style: :bold, align: :center
|
||||
@report.elements.each do |element|
|
||||
pdf.text element.title, size: 16, style: :bold
|
||||
pdf.text element.path
|
||||
pdf.markup prepare_rich_text(element.description_html.to_s), inline_format: true
|
||||
|
||||
element.success_criteria.each do |success_criterion|
|
||||
pdf.text success_criterion.title, size: 14, style: :bold
|
||||
pdf.markup prepare_rich_text(success_criterion.description_html.to_s), inline_format: true
|
||||
pdf.markup prepare_rich_text(success_criterion.comment_html.to_s), inline_format: true
|
||||
end
|
||||
end
|
||||
end
|
||||
prawn_document { PdfDocuments::CustomerReport.new(_1, report: @report).create }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue