class Libis::Format::Converter::OfficeConverter

Public Class Methods

input_types() click to toggle source
# File lib/libis/format/converter/office_converter.rb, line 14
def self.input_types
  [
      :TXT,
      :RTF,
      :HTML,
      :MSDOC,
      :MSDOT,
      :MSXLS,
      :MSPPT,
      :MSDOCX,
      :MSDOTX,
      :MSXLSX,
      :MSPPTX,
      :WORDPERFECT,
      :OO_WRITER,
      :OO_IMPRESS,
      :OO_CALC
  ]
end
output_types(format = nil) click to toggle source
# File lib/libis/format/converter/office_converter.rb, line 34
def self.output_types(format = nil)
  return [] unless input_types.include?(format) if format
  [:PDF]
end

Public Instance Methods

convert(source, target, format, opts = {}) click to toggle source
Calls superclass method Libis::Format::Converter::Base#convert
# File lib/libis/format/converter/office_converter.rb, line 43
def convert(source, target, format, opts = {})
  super

  return nil unless Format::Tool::OfficeToPdf.run(source, target)

  target

end
office_convert(_) click to toggle source
# File lib/libis/format/converter/office_converter.rb, line 39
def office_convert(_)
  #force usage of this converter
end