Sha256: 7d3283a25c781e0271cb80a268b42bfe8be32a836cf02a05b0bf4301111d439a

Contents?: true

Size: 689 Bytes

Versions: 19

Compression:

Stored size: 689 Bytes

Contents

require "isodoc"
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[:hierarchicalassets]
        super
      end

      def pdf_stylesheet(docxml)
        doctype = docxml&.at(ns("//bibdata/ext/doctype"))&.text
        if File.exist?(File.join(@libdir, "itu.#{doctype}.xsl"))
          "itu.#{doctype}.xsl"
        else
          "itu.recommendation.xsl"
        end
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
metanorma-itu-2.3.1 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-2.3.0 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-2.2.15 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-2.2.14 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-2.2.13 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-2.2.12 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-2.2.11 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-2.2.10 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-2.2.9 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-2.2.8 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-2.2.7 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-2.2.6 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-2.2.5 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-2.2.4 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-2.2.3 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-2.2.2 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-2.2.1 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-2.2.0 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-2.1.13 lib/isodoc/itu/pdf_convert.rb