Skip to content

Development repository for mn2pdf with Metanorma document samples

Notifications You must be signed in to change notification settings

metanorma/mn-native-pdf

Repository files navigation

Metanorma Native PDF

Build Status Build Status Build Status

The experimental PDFs are available here:

Purpose

This repository pilots native PDF capabilities of Metanorma using XML-FO via Apache FOP.

Installing Build Tools

You will need mn2pdf, envsubst, make and a number of fonts.

On macOS

# Install `envsubst`
brew install gettext
brew link --force gettext

# Install cabextract
brew install cabextract
# Install Microsoft Vista fonts
export RENAME_FONTS=false
curl -Ls https://raw.githubusercontent.com/metanorma/vista-fonts-installer/master/vista-fonts-installer.sh | bash

Generating XSLT layouts (will be created under xslt/):

make xslts

Building the document is then easy:

make all

# PDFs will be generated as documents/*.pdf

On Ubuntu Linux

sudo apt-get -y install gettext-base cabextract wget

# Install fontforge
sudo apt-get -y install software-properties-common

# Install MS system fonts
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections
sudo apt-get install ttf-mscorefonts-installer

# Setup Cambria fonts
curl -Ls https://raw.githubusercontent.com/metanorma/vista-fonts-installer/master/vista-fonts-installer.sh | sudo bash

Generating XSLT layouts (will be created under xslt/):

make xslts

Building the document is then easy:

# Pull submodules
make update-init update-modules

# PDFs will be generated as documents/*.pdf
make all

Ribose Inc.

About

Development repository for mn2pdf with Metanorma document samples

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published