minicomic-backend/classes/TempBitmapToPrint.rb

18 lines
443 B
Ruby
Raw Normal View History

2010-01-08 01:30:48 +00:00
require File.dirname(__FILE__) + '/OutputFilter.rb'
require File.dirname(__FILE__) + '/../modules/PrintHandling.rb'
#
# Convert a bitmap to a single page print for proofing
#
class TempBitmapToPrint < OutputFilter
include PrintHandling
def build(input, output)
build_for_print(input, "| pbm:- | sam2p -c:lzw -m:dpi:#{calculate_dpi} - PDF:\"#{output}\"")
end
def calculate_dpi
(72.0 * (72.0 / @config['dpi'].to_f))
end
end