Sha256: 31bbfd9321773fc2b49ed1d412d577e96e638ffbb6c404b97929146b1be5c48d

Contents?: true

Size: 856 Bytes

Versions: 3

Compression:

Stored size: 856 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 PdfSplit
        include ::Libis::Tools::Logger

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

        def run(source, 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],
              '-cp', Libis::Format::Config[:pdf_tool],
              'SplitPdf',
              '--file_input', source,
              '--file_output', target,
              *options
          )

        end
      end

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
libis-format-0.9.49 lib/libis/format/tool/pdf_split.rb
libis-format-0.9.48 lib/libis/format/tool/pdf_split.rb
libis-format-0.9.47 lib/libis/format/tool/pdf_split.rb