Class: DragonflyPdf::Processors::Append

Inherits:
Object
  • Object
show all
Defined in:
lib/dragonfly_pdf/processors/append.rb

Instance Method Summary collapse

Instance Method Details

#call(content, pdfs_to_append, _options = {}) ⇒ Object



4
5
6
7
8
# File 'lib/dragonfly_pdf/processors/append.rb', line 4

def call(content, pdfs_to_append, _options = {})
  content.shell_update(ext: :pdf) do |old_path, new_path|
    "#{pdftk_command} #{old_path} #{pdfs_to_append.map(&:path).join(' ')} cat output #{new_path}"
  end
end