Translations of this page?:

HTML to PDF (Plugin)

What this plugin does

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.

How to install this plugin

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 http://www.htmldoc.org/

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}');

How to use this plugin

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.

Discussion

PLEASE NOTE: Comments to the wiki should only contain suggestions and questions that help us to improve the manual (and not the software). These comments will be deleted as soon as the information has been integrated into the manual.

Posts that do not contribute to the DOCUMENTATION of the project will be DELETED.

Ask QUESTIONS on the product here.
Report BUGS here.
Propose NEW FEATURES here.


Shahan Khan, 2010-04-15 23:23

The plugin also allows you to use other html to pdf converters. On my Feng Office installation, I use http://code.google.com/p/wkhtmltopdf/downloads/list

here is the settings I use: define('HTMLDOC_COMMAND', '/usr/local/bin/wkhtmltopdf'); define('HTMLDOC_ARGS', ' -n –page-size Letter –margin-right .75in –margin-left .75in –margin-top .75in –margin-bottom .75in –outline {src} {dest}');

wkhtmltopdf renders html docs in Feng Office a lot better than htmldoc, as it uses Webkit.

Enter your comment
 
html_to_pdf.txt · Last modified: 2013-02-27 18:06 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported


Terms of Service | Privacy and Security policies | Copyright © 2014 fengoffice.com