Method: IsoDoc::XslfoPdfConvert#convert
- Defined in:
- lib/isodoc/xslfo_convert.rb
#convert(input_fname, file = nil, debug = false, output_fname = nil) ⇒ Object
input_file: keep-alive tempfile
55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/isodoc/xslfo_convert.rb', line 55 def convert(input_fname, file = nil, debug = false, output_fname = nil) file = File.read(input_fname, encoding: "utf-8") if file.nil? input_file, docxml, filename = input_xml_path(input_fname, file, debug) @doctype = Nokogiri::XML(file).at(ns("//bibdata/ext/doctype"))&.text ::Metanorma::Output::XslfoPdf.new.convert( filename, output_fname || output_filename(input_fname), File.join(@libdir, pdf_stylesheet(docxml)), (docxml), ) end |