Sha256: 6af76f804c00915bf2436c69ad3aa0a6a31fb05668f4527504fb979e39d191e5
Contents?: true
Size: 1.01 KB
Versions: 10
Compression:
Stored size: 1.01 KB
Contents
# encoding: utf-8 require_relative 'base' require 'libis/format/tool/office_to_pdf' require 'libis/format/type_database' module Libis module Format module Converter class OfficeConverter < Libis::Format::Converter::Base def self.input_types [ :TXT, :RTF, :HTML, :MSDOC, :MSDOT, :MSXLS, :MSPPT, :MSDOCX, :MSDOTX, :MSXLSX, :MSPPTX, :WORDPERFECT, :OO_WRITER, :OO_IMPRESS, :OO_CALC ] end def self.output_types(format = nil) return [] unless input_types.include?(format) [:PDF] end def office_convert(_) #force usage of this converter end def convert(source, target, format, opts = {}) super Format::Tool::OfficeToPdf.run(source, target) end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems