lib/isodoc/iso/pdf_convert.rb in metanorma-iso-1.3.27 vs lib/isodoc/iso/pdf_convert.rb in metanorma-iso-1.4.0
- old
+ new
@@ -18,22 +18,9 @@
when "amendment", "technical-corrigendum" then "itu.recommendation-annex.xsl"
else
"iso.international-standard.xsl"
end
end
-
- def convert(filename, file = nil, debug = false)
- file = File.read(filename, encoding: "utf-8") if file.nil?
- docxml, outname_html, dir = convert_init(file, filename, debug)
- /\.xml$/.match(filename) or
- filename = Tempfile.open([outname_html, ".xml"], encoding: "utf-8") do |f|
- f.write file
- f.path
- end
- FileUtils.rm_rf dir
- ::Metanorma::Output::XslfoPdf.new.convert(
- filename, outname_html + ".pdf", File.join(@libdir, pdf_stylesheet(docxml)))
- end
end
end
end