ChiliPDF Plugin - Flexible PDF exporting for ChiliProject/Redmine
ChiliProject (/Redmine) plugin which implements/enhances PDF-export functionality using the Webkit rendering engine (via the 'wkhtmltopdf' executable).
NOTABLE ITEMS TO CONSIDER
- This plugin is distributed as a gem, but does ship with asset files (stylesheets, etc). Therefore, the installation procedure is not the standard process.
- There is a dependency on having the wkhtmltopdf binary installed.on your server. Technically this is a dependency of the library being used to generate the PDFs (wicked_pdf), but, it's something you should be aware of.
- Two patches to consider adding to your Redmine/ChiliProject core application:
- (REQUIRED) In order to prevent a 'Double render' error on the WikiController. A pull request has been submitted to the ChiliProject core team. Until then, you can manually apply the (small) patch to your app if you like. The changeset can be found here.
- (Optional) To get a "PDF" link on the bottom of your project wiki pages, you need to apply a (one-line) diff to your ChiliProject codebase. You can find the diff here. There is a "Feature request" issue set up with a patch/pull request for the implementation so it may be in the core soon. You can follow along with the issue status here.
- Provides PDF export of any project wiki page to PDF with a decent baseline style out of the box.
- Support for dynamic content in headers and footers administered via the plugin configuration page.
- Custom logo support. You can specify the URL of an image to place in the top-right corner of the first page of all exported PDFs.
- Adds a "PDF" link to the "Also available in" list of links at the bottom of all wiki pages (merged, but not released yet).
- No other PDF exports have been implemented yet using this library, so there will be two PDF libraries in your application if you add this plugin. This won't cause any problems, but...just know that any other PDF exports you do are not a result of this gem. Issues, roadmaps, and Gantt charts will likely be coming if the wiki exports show promise.
- Install version 0.9.9 of the wkhtmltopdf executable on the machine hosting ChiliProject. You can find binaries for Mac, Windows, and Linux here.
- Install the chili_pdf gem
- Cycle your application servers (Mongrel, unicorn, Passenger, etc)
- Visit any wiki page and manually add a '.pdf' extension to the URL
- NOTE: You must be on an individual wiki page. Manually adding the '.pdf' on the 'default wiki page' URL (http://yoursite.com/projects/:project_id/wiki) will not work correctly at this time. The manual step will be removed in a future release.
gem install chili_pdf
Manual steps after gem installation
In your 'config/environment.rb', add:
In your 'Rakefile', add:
Run the installation rake task (installs assets)
RAILS_ENV=production rake chili_pdf:install
Cycle your application server (mongrel, unicorn, etc)
Run the uninstall rake task (reverts migrations & uninstalls assets)
RAILS_ENV=production rake chili_pdf:uninstall
In your 'Rakefile', remove:
In your 'config/environment.rb', remove:
Cycle your application server (mongrel, unicorn, whatevs)...
Then, uninstall the gem:
gem uninstall chili_pdf
CONTRIBUTING AND/OR SUPPORT:
Found a bug? Have a feature request?
Please file a ticket on the 'Issues' page of the Github project site
You can also drop me a message on Twitter @tomkersten.
Want to contribute?
(Better instructions coming soon)
- Fork the project
- Create a feature branch and implement your idea (preferably with tests)
- Update the History.txt file in the 'Next Release' section (at the top)
- Send a pull request
Refer to the LICENSE file
Contributors (sorted alphabetically)
- Roy Kolak