HTML to PDF (Plugin)

This plugin adds an “Export to PDF” action on HTML documents' view that will download a PDF version of the document. This plugin requires htmldoc installed on the server or a similar tool to convert HTML documents to PDF.

1- Make sure you have htmldoc installed. It is included in the standard software
repositories of most Linux distributions, so you can install it with the standard
tools. For windows users or any other case, see

2- Unzip the plugin into your FengOffice installation

3- If the command to run htmldoc is other than 'htmldoc' define a constant
	HTMLDOC_COMMAND on 'config/config.php' specifying the path to htmldoc.
    - e.g. 1:
    	define('HTMLDOC_COMMAND', '/usr/bin/htmldoc');
    - e.g. 2:
    	define('HTMLDOC_COMMAND', 'C:\htmldoc\htmldoc.exe');

You can use a different tool than htmldoc, as long as this tool reads an HTML
file from a specified path and writes a PDF file to a specified path. Assuming
you want to use a program called 'html2pdf' that expects two arguments (input and output)
you would have to define these two constants on 'config/config.php' to make it work:

	define('HTMLDOC_COMMAND', '/path/to/html2pdf');
	define('HTMLDOC_ARGS', '-input {src} -output {dest}');

Go to a document in FengOffice and open it. In the right sidebar with actions click on more, and then click on “export to PDF”. The document will be downloaded as a pdf file.