Class: Libis::Format::PdfMerge
- Inherits:
-
Object
- Object
- Libis::Format::PdfMerge
- Includes:
- Tools::Logger
- Defined in:
- lib/libis/format/pdf_merge.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_merge.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 36 37 |
# File 'lib/libis/format/pdf_merge.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') source = [source] unless source.is_a?(Array) 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, 'MergePdf', '--file_output', target, *, *source, ) end |