Sha256: 3f97ed34562ebaa0b811eb5179b1467214e1e123ce8558110608a98637a30ba6

Contents?: true

Size: 877 Bytes

Versions: 17

Compression:

Stored size: 877 Bytes

Contents

# encoding: utf-8

require_relative 'base'

require 'libis/format/office_to_pdf'
require 'libis/format/type_database'

module Libis
  module Format
    module Converter

      class OfficeConverter < Libis::Format::Converter::Base

        def self.input_types(_ = nil)
          [
              :TXT,
              :RTF,
              :HTML,
              :MSDOC,
              :MSXLS,
              :MSPPT,
              :MSDOCX,
              :MSXLSX,
              :MSPPTX,
              :WORDPERFECT,
          ]
        end

        def self.output_types(_ = nil)
          [:PDF]
        end

        def office_convert(_)
          #force usage of this converter
        end

        def convert(source, target, format, opts = {})
          super

          return nil unless OfficeToPdf.run(source, target)

          target

        end

      end

    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
libis-format-0.9.22 lib/libis/format/converter/office_converter.rb
libis-format-0.9.21 lib/libis/format/converter/office_converter.rb
libis-format-0.9.20 lib/libis/format/converter/office_converter.rb
libis-format-0.9.19 lib/libis/format/converter/office_converter.rb
libis-format-0.9.18 lib/libis/format/converter/office_converter.rb
libis-format-0.9.17 lib/libis/format/converter/office_converter.rb
libis-format-0.9.16 lib/libis/format/converter/office_converter.rb
libis-format-0.9.15 lib/libis/format/converter/office_converter.rb
libis-format-0.9.13 lib/libis/format/converter/office_converter.rb
libis-format-0.9.12 lib/libis/format/converter/office_converter.rb
libis-format-0.9.11 lib/libis/format/converter/office_converter.rb
libis-format-0.9.10 lib/libis/format/converter/office_converter.rb
libis-format-0.9.8 lib/libis/format/converter/office_converter.rb
libis-format-0.9.7 lib/libis/format/converter/office_converter.rb
libis-format-0.9.6 lib/libis/format/converter/office_converter.rb
libis-format-0.9.5-java lib/libis/format/converter/office_converter.rb
libis-format-0.9.4 lib/libis/format/converter/office_converter.rb