Class: IsoDoc::UN::PdfConvert

Inherits:
XslfoPdfConvert
  • Object
show all
Defined in:
lib/isodoc/un/pdf_convert.rb

Overview

A Converter implementation that generates HTML output, and a document schema encapsulation of the document for validation

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ PdfConvert

Returns a new instance of PdfConvert.



11
12
13
14
# File 'lib/isodoc/un/pdf_convert.rb', line 11

def initialize(options)
  @libdir = File.dirname(__FILE__)
  super
end

Instance Method Details

#pdf_stylesheet(docxml) ⇒ Object



16
17
18
19
20
21
22
23
24
# File 'lib/isodoc/un/pdf_convert.rb', line 16

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