Sha256: be39dbd91e01bdee47f82d38870ca7f7b1a57faa774b9057098f86aa2ce6cdb1

Contents?: true

Size: 751 Bytes

Versions: 8

Compression:

Stored size: 751 Bytes

Contents

require "isodoc"
require_relative "metadata"
require "fileutils"

module IsoDoc
  module ITU
    # A {Converter} implementation that generates PDF HTML output, and a
    # document schema encapsulation of the document for validation
    class PdfConvert < IsoDoc::XslfoPdfConvert
      def initialize(options)
        @libdir = File.dirname(__FILE__)
        @hierarchical_assets = options[:hierarchical_assets]
        super
      end

      def pdf_stylesheet(docxml)
        case doctype = docxml&.at(ns("//bibdata/ext/doctype"))&.text
        when "resolution" then "itu.resolution.xsl"
        when "recommendation-annex" then "itu.recommendation-annex.xsl"
        else
          "itu.recommendation.xsl"
        end
      end
    end
  end
end

Version data entries

8 entries across 6 versions & 2 rubygems

Version Path
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/metanorma-itu-1.1.2/lib/isodoc/itu/pdf_convert.rb
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/metanorma-itu-1.1.3/lib/isodoc/itu/pdf_convert.rb
metanorma-cli-1.3.3.1 gems/ruby/2.6.0/gems/metanorma-itu-1.1.2/lib/isodoc/itu/pdf_convert.rb
metanorma-cli-1.3.3.1 gems/ruby/2.6.0/gems/metanorma-itu-1.1.3/lib/isodoc/itu/pdf_convert.rb
metanorma-itu-1.1.3 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-1.1.2 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-1.1.1 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-1.1.0 lib/isodoc/itu/pdf_convert.rb