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.11.1 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.11.0 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.10.13 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.10.12 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.10.11 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.10.10 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.10.9 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.10.8 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.10.7 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.10.6 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.10.5 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.10.4 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.10.3 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.10.2 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.10.1 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.10.0 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.9.13 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.9.12 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.9.11 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.9.10 lib/isodoc/un/pdf_convert.rb