Sha256: 4a4a6e4951451be86ef18beb978b5a8a5526a832b30eae654076bfe7fd0083a9

Contents?: true

Size: 690 Bytes

Versions: 33

Compression:

Stored size: 690 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
        if File.exist?(File.join(@libdir, "itu.#{doctype}.xsl"))
          "itu.#{doctype}.xsl"
        else
          "itu.recommendation.xsl"
        end
      end
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
metanorma-itu-2.1.12 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-2.1.11 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-2.1.10 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-2.1.9 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-2.1.8.1 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-2.1.8 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-2.1.7 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-2.1.6 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-2.1.5.1 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-2.1.5 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-2.1.4 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-2.1.3 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-2.1.2 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-2.1.1 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-2.1.0 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-2.0.8.1 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-2.0.8 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-2.0.7 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-2.0.6 lib/isodoc/itu/pdf_convert.rb
metanorma-itu-2.0.5 lib/isodoc/itu/pdf_convert.rb