Sha256: 68ad70592d98cd1edc654354867e1f3b9889aa354fa820baced713496157ca4f

Contents?: true

Size: 448 Bytes

Versions: 4

Compression:

Stored size: 448 Bytes

Contents

module Booky::Pdf
  
  def self.create
    puts "\n-> Creating PDF"
    raise "File #{Booky.name}.fo not found. Sorry" if !File.exists?("#{Booky.name}.fo")
    
    @@fop = "#{Booky.root}/lib/fop/fop"
    @@custom_fonts_xml  = "#{Booky.root}/lib/custom_fonts.xml"
    
    puts `#{@@fop} -c #{@@custom_fonts_xml} -fo #{Booky.name}.fo -pdf #{Booky.name}.pdf`
    
    puts "Done.\n"
  end
  
  def self.open
    `open #{Booky.name}.pdf`
  end
  
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
booky-0.0.4 lib/booky/pdf.rb
booky-0.0.3 lib/booky/pdf.rb
booky-0.0.2 lib/booky/pdf.rb
booky-0.0.1 lib/booky/pdf.rb