Sha256: 7ddae5356844c3e9b5dcb95c1e8755e18ccacdca7f798d1dd146a2429b1a88fc
Contents?: true
Size: 819 Bytes
Versions: 1
Compression:
Stored size: 819 Bytes
Contents
# = pdf/merger.rb -- PDF merging # # Copyright 2010-12 Paul Schreiber require 'rbconfig' require 'fileutils' require 'tmpdir' include FileUtils module PDF class Merger VERSION = "0.1.2" if RUBY_PLATFORM =~ /java/ # ifdef to check if your using JRuby require 'pdf/merger/jruby' else require 'pdf/merger/rjb' end # PDF::Merger provides an interface into iText allowing for the # merging of PDFs. # # == Example # # pdf = PDF::Merger.new # pdf.add_file "foo.pdf" # pdf.add_file "bar.pdf" # pdf.save_as "combined.pdf" def initialize @files_to_merge = [] @js = nil end def add_javascript(js) @js = js end def add_file(file_path) @files_to_merge << file_path end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pdf-merger-0.2.0 | lib/pdf/merger.rb |