Sha256: c81fd5e111227ee90ee3eefcbede5e08ebcef59ba3bfe54619e58974a39ff2fe

Contents?: true

Size: 851 Bytes

Versions: 1

Compression:

Stored size: 851 Bytes

Contents

require 'os'

require 'libis/tools/extend/string'
require 'libis/tools/logger'
require 'libis/tools/command'

require 'libis/format/config'

module Libis
  module Format
    module Tool

      class FopPdf
        include ::Libis::Tools::Logger

        def self.run(xml, target, options = [])
          self.new.run xml, target, options
        end

        def run(xml, target, options = [])

          if OS.java?
            # TODO: import library and execute in current VM. For now do exactly as in MRI.
          end

          Libis::Tools::Command.run(
              Libis::Format::Config[:java_path],
              "-Dfop.home=#{File.dirname(Libis::Format::Config[:fop_jar])}",
              '-jar', Libis::Format::Config[:fop_jar],
              '-fo', xml,
              '-pdf', target
          )

        end
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
libis-format-0.9.49 lib/libis/format/tool/fop_pdf.rb