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.5.16 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.5.15 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.5.14 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.5.13 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.5.12 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.5.11 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.5.10 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.5.9 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.5.8 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.5.7 lib/isodoc/un/pdf_convert.rb
metanorma-un-0.5.6 lib/isodoc/un/pdf_convert.rb