diff --git a/app/assets/stylesheets/contract_pdf.scss b/app/assets/stylesheets/contract_pdf.scss index 59c6abc..8c2571f 100644 --- a/app/assets/stylesheets/contract_pdf.scss +++ b/app/assets/stylesheets/contract_pdf.scss @@ -31,7 +31,7 @@ u { } .page { - page-break-before: always; + page-break-before: always; } .logo { @@ -44,6 +44,14 @@ u { text-align: right; } +.qr-code { + margin-right: -30px; +} + +.do-not-copy-warning { + padding-right: 15px; +} + .heading-table td { width: 50%; } diff --git a/app/models/blank_contract.rb b/app/models/blank_contract.rb index ee36282..cde5d8a 100644 --- a/app/models/blank_contract.rb +++ b/app/models/blank_contract.rb @@ -8,7 +8,7 @@ class BlankContract end def to_pdf - kit = PDFKit.new(as_html) + kit = PDFKit.new(as_html, margin_right: 1, margin_left: 1, margin_top: 10, margin_bottom: 1) kit.to_file("tmp/#{filename}") end diff --git a/app/models/qr_code.rb b/app/models/qr_code.rb index 637fc6c..a38e0df 100644 --- a/app/models/qr_code.rb +++ b/app/models/qr_code.rb @@ -24,7 +24,7 @@ class QrCode end end - def to_base64_png(width = 100, height = 100) + def to_base64_png(width = 200, height = 200) _qr_code.as_png.resize(width, height).to_data_url end diff --git a/app/views/blank_contracts/pdf.html.erb b/app/views/blank_contracts/pdf.html.erb index e70dbc3..87cc5f1 100644 --- a/app/views/blank_contracts/pdf.html.erb +++ b/app/views/blank_contracts/pdf.html.erb @@ -2,6 +2,10 @@
| + | <%= t '.do_not_copy_warning' %> | +
| <% if has_logo %> @@ -11,17 +15,9 @@ <% end %> |
- |
| - | <%= serial_numbers[copy_index] %> | -
| - | <%= t '.do_not_copy_warning' %> | -