Add watermark to your pdf. two external gem will be used: combine_pdf and prawn.
Add this line to your application's Gemfile:
gem 'pdf_watermark'
And then execute:
$ bundle
Or install it yourself as:
$ gem install pdf_watermark
require 'pdf_watermark'
PdfWatermark.watermark("Private and Confidential", "content.pdf", "result.pdf", {:margin => 20,:angle=>:diagonal})
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/pdf_watermark. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.