Sha256: 2a873ac9b4e5cb48d6b79035e4fa144957a853a7bfd633dc6faf0c9b6dbc878b

Contents?: true

Size: 712 Bytes

Versions: 71

Compression:

Stored size: 712 Bytes

Contents

require_relative "base_convert"
require "isodoc"

module IsoDoc
  module UN

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

      def pdf_stylesheet(docxml)
        case doctype = docxml&.at(ns("//bibdata/ext/doctype"))&.text
        when "plenary", "agenda", "budgetary" 
          "un.plenary.xsl"
        else
          docxml&.at(ns("//bibdata/ext/session/*")) ?
            "un.plenary-attachment.xsl" : "un.recommendation.xsl"
        end
      end
    end
  end
end

Version data entries

71 entries across 71 versions & 1 rubygems

Version Path
metanorma-un-0.9.9 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.9.8.1 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.9.8 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.9.7 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.9.6 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.9.5 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.9.4 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.9.3 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.9.2 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.9.1 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.9.0 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.8.8 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.8.7 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.8.6 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.8.5 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.8.4 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.8.3 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.8.2 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.8.1 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.8.0 lib/isodoc/un/pdf_convert.rb