Sha256: e38531168fa79b67e9f33ef3483dea21fa1b337280a26f9b25da0470ac2050ec

Contents?: true

Size: 1.89 KB

Versions: 6

Compression:

Stored size: 1.89 KB

Contents

= 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)
----

== 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

6 entries across 6 versions & 1 rubygems

Version Path
mn2pdf-1.22 README.adoc
mn2pdf-1.21 README.adoc
mn2pdf-1.20 README.adoc
mn2pdf-1.19 README.adoc
mn2pdf-1.18 README.adoc
mn2pdf-1.14 README.adoc