How to change entire pdf pages background color white to other color in rails

Viewed 1487

Using pdfkit gem. I have to change entire pdf pages default background color white to other color.. how achieve this..

Added below code:-

<BODY style=\"background-color:#04b4b4;\">

But it is not covering all pages, in last it covering only data area,(like below image)... enter image description here

Update:-

gem 'pdfkit', '0.5.0'
gem 'wkhtmltopdf-binary'

pdfkit.rb

PDFKit.configure do |config|
  config.default_options = {
    :page_size     => 'Letter',
    :margin_top    => '0in',
    :margin_right  => '0in',
    :margin_bottom => '1.0in',
    :margin_left   => '0in'
  }
end
1 Answers
Related