Class: IsoDoc::Ieee::PdfConvert

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

Overview

A Converter implementation that generates PDF 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.



9
10
11
12
# File 'lib/isodoc/ieee/pdf_convert.rb', line 9

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

Instance Method Details

#pdf_stylesheet(docxml) ⇒ Object



14
15
16
17
18
19
20
21
# File 'lib/isodoc/ieee/pdf_convert.rb', line 14

def pdf_stylesheet(docxml)
  doctype = docxml&.at(ns("//bibdata/ext/subdoctype"))&.text
  if %w(amendment corrigendum erratum).include?(doctype)
    "ieee.amendment.xsl"
  else
    "ieee.standard.xsl"
  end
end