Sha256: 4e93b9a750c292e300caa3e0194c7dbba4e4850d3cdadee836e22462e004190c
Contents?: true
Size: 993 Bytes
Versions: 7
Compression:
Stored size: 993 Bytes
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, ] 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 return nil unless Format::Tool::OfficeToPdf.run(source, target) target end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems