= mn2pdf Ruby gem image:https://img.shields.io/gem/v/metanorma.svg["Gem Version", link="https://rubygems.org/gems/metanorma"] image:https://github.com/metanorma/mn2pdf-ruby/workflows/ubuntu/badge.svg["Ubuntu Build Status", link="https://github.com/metanorma/mn2pdf-ruby/actions?query=workflow%3Aubuntu"] image:https://github.com/metanorma/mn2pdf-ruby/workflows/macos/badge.svg["OSX Build Status", link="https://github.com/metanorma/mn2pdf-ruby/actions?query=workflow%3Amacos"] image:https://github.com/metanorma/mn2pdf-ruby/workflows/windows/badge.svg["Windows Build Status", link="https://github.com/metanorma/mn2pdf-ruby/actions?query=workflow%3Awindows"] image:https://codeclimate.com/github/metanorma/mn2pdf-ruby/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/mn2pdf-ruby"] image:https://img.shields.io/github/issues-pr-raw/metanorma/mn2pdf-ruby.svg["Pull Requests", link="https://github.com/metanorma/mn2pdf-ruby/pulls"] image:https://img.shields.io/github/commits-since/metanorma/mn2pdf-ruby/latest.svg["Commits since latest",link="https://github.com/metanorma/mn2pdf-ruby/releases"] == Purpose The mn2pdf Ruby gem is a wrapper around the Java https://github.com/metanorma/mn2pdf[mn2pdf] which converts Metanorma XML files into native PDFs. This gem is used to provide mn2pdf.jar with mirrored version numbers, to allow Ruby code to easily refer to the desired mn2pdf version as dependencies. == Installation [source,ruby] ---- gem install mn2pdf ---- Or include it in your gemspec. == Usage [source,ruby] ---- require 'mn2pdf' Mn2pdf.convert(sample_xml_path, output_pdf_path, sample_xsl_path) ----