Writing documentation in a word processor can be a tedious job. Writing it in Markdown on the other hand is nice :) Since there's no previewer for Markdown documents in Alfresco, a transformer is the next best thing. This projects aim is to create a simple transformer that creates PDF documents out of Markdown documents. To achieve this it uses the excellent Pandoc command line binary. This module only handles conversions from .md to .pdf, but it can be extended to handle other formats too, as long as Pandoc supports them.
Follow these steps to download the source code and to build the project.
git clone https://github.com/oakman/pandoc-transformer
cd pandoc-transfomer
mvn clean package
This builds a .jar file that can then be used in an Alfresco installation. To build with integration testing, issue mvn -Pit,purge clean verify
instead.
- Copy the .jar file to the
tomcat/webapps/alfresco/WEB-INF/lib
folder. - Install pandoc. Don't use the package manager version, it's probably too old. Download the .deb package instead from here and install it with
dpkg -i <package-file>
. - In order for PDF's to be created, LaTeX is used. Install it with
sudo apt-get install texlive
orsudo apt-get install texlive-full
.
- Copy the .jar file to the
tomcat/webapps/alfresco/WEB-INF/lib
folder. - Install pandoc. The homebrew version is nice, install it with
brew install pandoc
. - In order for PDF's to be created, LaTeX is used. There's a huge package that needs to be installed, do this with homebrew
brew cask install mactex
. It could also work with a stripped down version, BasicTeX. To install that one, usebrew cask install basictex
instead of the previous command.
Who in it's right mind uses Windows? If you happen to do this, you're on your own.
In order for this module to work properly, there's one configuration key that has to be checked if it's correct, and configured if it's not correct.
pandoc.exe=/usr/local/bin/pandoc
If installed in Ubuntu it most probably need to be configured, if installed on Mac OS X & Homebrew it's probably correct.