lib/fn/pdf/writer.rb in fn_document-0.9.3 vs lib/fn/pdf/writer.rb in fn_document-0.9.4

- old
+ new

@@ -1,9 +1,9 @@ require "rubygems" require "PDFlib" require "RMagick" -require "tempfile" +require "tempfile" # Built into ruby Dir[File.dirname(__FILE__) + "/node/*.rb"].each do |f| require f.sub(/\.rb$/, '') end module FN module PDF @@ -123,11 +123,11 @@ context.add LoadImage(image, "tmp") context.add FitImage("{tmp}", x, y, :fitmethod => "meet", :boxsize => [width, height]) end rescue Magick::ImageMagickError => e - STDERR.puts e.message - STDERR.puts e.backtrace.join("\n") + $stderr.puts e.message + $stderr.puts e.backtrace.join("\n") raise WriterError.new("Couldn't load '#{block.src}', given by #{doc.resource(block.src).node}") end end doc.pages.each do |page| \ No newline at end of file