Sha256: f78701b7808c8f47c0f20547029a19ce7a2574f53cd29f4053b708b39adb7254

Contents?: true

Size: 1.99 KB

Versions: 1

Compression:

Stored size: 1.99 KB

Contents

= mn2pdf Ruby gem

image:https://img.shields.io/gem/v/mn2pdf.svg["Gem Version", link="https://rubygems.org/gems/mn2pdf"]
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, options = "")
----

The options are any options trailing in the mn2pdf Java executable, e.g. `--split-by-language`.

== Updating the gem

Update `lib/mn2pdf/version.rb` to the desired version of https://github.com/metanorma/mn2pdf[mn2pdf].

Run `rake` to download the `bin/mn2pdf.jar` file:

[source,ruby]
----
rm -f bin/mn2pdf.jar
rake bin/mn2pdf.jar
----

Then release the gem with `rake release`.


Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mn2pdf-1.22.2 README.adoc