Sha256: 303df9c41cedb64ece8c8e6ca66f7a3b874aae310481d9d359d358f58dab8d6c

Contents?: true

Size: 655 Bytes

Versions: 16

Compression:

Stored size: 655 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[:hierarchical_assets]
        super
      end

      def pdf_stylesheet(docxml)
        doctype = docxml&.at(ns("//bibdata/ext/doctype"))&.text

        "itu.#{doctype}.xsl" if File.exist?(File.join(@libdir, "itu.#{doctype}.xsl"))

        "itu.recommendation.xsl"
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
metanorma-itu-1.3.12 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-1.3.11 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-1.3.10 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-1.3.9 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-1.3.8 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-1.3.7 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-1.3.6 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-1.3.5 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-1.3.4 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-1.3.3 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-1.3.2 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-1.3.1 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-1.3.0 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-1.2.16 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-1.2.15 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-1.2.14 lib/isodoc/itu/pdf_convert.rb