lib/pdf/merger/jruby.rb in pdf-merger-0.1.1 vs lib/pdf/merger/jruby.rb in pdf-merger-0.1.2

- old
+ new

@@ -12,18 +12,20 @@ module PDF class Merger # Saves the PDF into a file defined by path given. + # return the number of pages in the new file def save_as(output_file_path) filestream = FileOutputStream.new(output_file_path) copy = PdfCopyFields.new(filestream) @files_to_merge.each do |f| copy.addDocument(PdfReader.new(f)) end copy.close() + PdfReader.new(output_file_path).getNumberOfPages end end end