Sha256: f6dbc6f9743dbfc3d0fdd8ccf4088b4ce2a3494b39016683d99151aee705790c
Contents?: true
Size: 812 Bytes
Versions: 10
Compression:
Stored size: 812 Bytes
Contents
require 'nokogiri' require_relative 'base' require 'libis/format/tool/fop_pdf' module Libis module Format module Converter class FopPdfConverter < Libis::Format::Converter::Base def self.input_types [:XML] end def self.output_types(format = nil) return [] unless input_types.include?(format) if format [:PDF] end def convert(source, target, _format, opts = {}) super unless File.file?(source) && File.exist?(source) && File.readable?(source) error "File '#{source}' does not exist or is not readable" return nil end FileUtils.mkpath(File.dirname(target)) Libis::Format::Tool::FopPdf.run(source, target) end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems