lib/pdf/merger/rjb.rb in pdf-merger-0.3.1 vs lib/pdf/merger/rjb.rb in pdf-merger-0.3.2
- old
+ new
@@ -34,19 +34,19 @@
if File.exists?(f)
begin
copy.addDocument(@pdfreader.new(f))
rescue => e
failure_list << f
- Rails.logger.warn "PDF::Merger: Invalid PDF: #{f}"
+ log "PDF::Merger: Invalid PDF: #{f}"
end
else
failure_list << f
- Rails.logger.warn "PDF::Merger: File does not exist: #{f}"
+ log "PDF::Merger: File does not exist: #{f}"
end
end
if @files_to_merge.size - failure_list.size > 0
- copy.addJavaScript(@js) if @js.present?
+ copy.addJavaScript(@js) if @js && !@js.empty?
copy.close()
@pdfreader.new(output_file_path).getNumberOfPages
else
0
end