Class: DragonflyPdf::Processors::Stamp
- Inherits:
-
Object
- Object
- DragonflyPdf::Processors::Stamp
- Defined in:
- lib/dragonfly_pdf/processors/stamp.rb
Instance Method Summary collapse
Instance Method Details
#call(content, stamp_pdf, _options = {}) ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/dragonfly_pdf/processors/stamp.rb', line 4 def call(content, stamp_pdf, = {}) raise UnsupportedFormat unless content.ext raise UnsupportedFormat unless SUPPORTED_FORMATS.include?(content.ext.downcase) content.shell_update(ext: 'pdf') do |old_path, new_path| "#{pdftk_command} \"#{old_path}\" stamp \"#{stamp_pdf.path}\" output \"#{new_path}\"" end end |