# mPDF for Pressbooks
[![Build Status](https://travis-ci.com/BCcampus/pressbooks-mpdf.svg?branch=dev)](https://travis-ci.com/BCcampus/pressbooks-mpdf)

Open source PDF generation for [Pressbooks](https://github.com/pressbooks/pressbooks) via the [mPDF](https://github.com/mpdf/mpdf) library.

## Description 

[mPDF](https://github.com/mpdf/mpdf) is an open source PHP class that generates PDF files from HTML.

This plugin is an open source alternative for PDF generation if the license fee for [PrinceXML](http://www.princexml.com/) is a barrier for users of Pressbooks.

[Pressbooks](https://wordpress.org/plugins/pressbooks/) is a requirement in order for this plugin to do anything useful.


## Installation 

IMPORTANT!

You must first install [Pressbooks](https://github.com/pressbooks/pressbooks). This plugin won't work without it.
The Pressbooks github repository is updated frequently. [Stay up to date](https://github.com/pressbooks/pressbooks/tree/master).


### What is mPDF?

[mPDF](https://mpdf.github.io/): A PHP library to generate PDF files from HTML with Unicode/UTF-8 and CJK support

It is based on FPDF and HTML2FPDF with a number of enhancements.


### Using Git 

1. cd /wp-content/plugins
2. `git clone https://github.com/BCcampus/pressbooks-mpdf.git`
3. Activate the plugin at the network level, through the 'Plugins' menu in WordPress


### OR, go to the WordPress Dashboard 

1. Navigate to the Network Admin -> Plugins
2. Search for 'mPDF for Pressbooks'
3. Click 'Network Activate'


### OR, upload manually 

1. Upload `pressbooks-mpdf` to the `/wp-content/plugins/` directory
2. Activate the plugin at the network level, through the 'Plugins' menu in WordPress


## Changelog 

See: https://github.com/BCcampus/pressbooks-mpdf/commits/master for more detail

## How to contribute code 

Pull requests are enthusiastically received **and** scrutinized for quality.

* The best way is to initiate a pull request on [GitHub](https://github.com/BCcampus/pressbooks-mpdf).
