Class: Libis::Format::PdfSplit
- Inherits:
-
Object
- Object
- Libis::Format::PdfSplit
- Includes:
- Tools::Logger
- Defined in:
- lib/libis/format/pdf_split.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.run(source, target, options = []) ⇒ Object
15 16 17 |
# File 'lib/libis/format/pdf_split.rb', line 15 def self.run(source, target, = []) self.new.run source, target, end |
Instance Method Details
#run(source, target, options = []) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/libis/format/pdf_split.rb', line 19 def run(source, target, = []) tool_dir = File.absolute_path(File.join(File.dirname(__FILE__), '..', '..', '..', 'tools')) jar_file = File.join(tool_dir, 'PdfTool.jar') 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', jar_file, 'SplitPdf', '--file_input', source, '--file_output', target, * ) end |