chore(rubocop): enable on .prawn files
This commit is contained in:
parent
d30f51af79
commit
b1e9dffbc6
5 changed files with 28 additions and 23 deletions
|
@ -2,7 +2,7 @@ require 'prawn/measurement_extensions'
|
|||
|
||||
#----- A4 page size
|
||||
page_size = 'A4'
|
||||
page_height = 842
|
||||
# page_height = 842
|
||||
page_width = 595
|
||||
|
||||
#----- margins
|
||||
|
@ -11,7 +11,7 @@ top_margin = 50
|
|||
bottom_margin = 20
|
||||
footer_height = top_margin - bottom_margin
|
||||
|
||||
right_margin = (page_width - body_width)/2
|
||||
right_margin = (page_width - body_width) / 2
|
||||
left_margin = right_margin
|
||||
|
||||
#----- size of images
|
||||
|
@ -32,7 +32,7 @@ logo = @attestation[:logo]
|
|||
signature = @attestation[:signature]
|
||||
|
||||
prawn_document(margin: [top_margin, right_margin, bottom_margin, left_margin], page_size: page_size) do |pdf|
|
||||
pdf.font_families.update( 'marianne' => { normal: Rails.root.join('lib/prawn/fonts/marianne/marianne-regular.ttf' )})
|
||||
pdf.font_families.update('marianne' => { normal: Rails.root.join('lib/prawn/fonts/marianne/marianne-regular.ttf') })
|
||||
pdf.font 'marianne'
|
||||
|
||||
grey = '555555'
|
||||
|
@ -47,7 +47,7 @@ prawn_document(margin: [top_margin, right_margin, bottom_margin, left_margin], p
|
|||
else
|
||||
logo.rewind && logo.read
|
||||
end
|
||||
pdf.image StringIO.new(logo_content), fit: [max_logo_width , max_logo_height], position: :center
|
||||
pdf.image StringIO.new(logo_content), fit: [max_logo_width, max_logo_height], position: :center
|
||||
end
|
||||
|
||||
pdf.fill_color grey
|
||||
|
@ -66,7 +66,7 @@ prawn_document(margin: [top_margin, right_margin, bottom_margin, left_margin], p
|
|||
else
|
||||
signature.rewind && signature.read
|
||||
end
|
||||
pdf.image StringIO.new(signature_content), fit: [max_signature_size , max_signature_size], position: :right
|
||||
pdf.image StringIO.new(signature_content), fit: [max_signature_size, max_signature_size], position: :right
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue