Sha256: 08f372d13fd97092d69b1745b03b0a5154c454746f3e03da03f7b2600ac0f035

Contents?: true

Size: 392 Bytes

Versions: 71

Compression:

Stored size: 392 Bytes

Contents

module Dorsale
  module Alexandrie
    module Prawn
      def render_with_attachments
        final_pdf = ::CombinePDF.parse(self.render)

        @main_document.attachments.each do |attachment|
          next unless File.extname(attachment.file.path) == ".pdf"

          final_pdf << ::CombinePDF.load(attachment.file.path)
        end

        final_pdf.to_pdf
      end
    end
  end
end

Version data entries

71 entries across 71 versions & 1 rubygems

Version Path
dorsale-3.3.0 lib/dorsale/alexandrie/prawn.rb
dorsale-3.2.0 lib/dorsale/alexandrie/prawn.rb
dorsale-3.1.7 lib/dorsale/alexandrie/prawn.rb
dorsale-3.1.6 lib/dorsale/alexandrie/prawn.rb
dorsale-3.1.5 lib/dorsale/alexandrie/prawn.rb
dorsale-3.1.4 lib/dorsale/alexandrie/prawn.rb
dorsale-3.1.3 lib/dorsale/alexandrie/prawn.rb
dorsale-3.1.2 lib/dorsale/alexandrie/prawn.rb
dorsale-3.1.1 lib/dorsale/alexandrie/prawn.rb
dorsale-3.1.0 lib/dorsale/alexandrie/prawn.rb
dorsale-3.0.3 lib/dorsale/alexandrie/prawn.rb
dorsale-3.0.2 lib/dorsale/alexandrie/prawn.rb
dorsale-3.0.1 lib/dorsale/alexandrie/prawn.rb
dorsale-3.0.0 lib/dorsale/alexandrie/prawn.rb
dorsale-2.7.3 lib/dorsale/alexandrie/prawn.rb
dorsale-2.7.2 lib/dorsale/alexandrie/prawn.rb
dorsale-2.7.1 lib/dorsale/alexandrie/prawn.rb
dorsale-2.7.0 lib/dorsale/alexandrie/prawn.rb
dorsale-2.6.8 lib/dorsale/alexandrie/prawn.rb
dorsale-2.6.7 lib/dorsale/alexandrie/prawn.rb